From 1fb62343dd0abd9d7a4a6fb3de977aa717d44755 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sun, 11 Dec 2022 02:12:52 +0100 Subject: [PATCH] etc/vim/source/functions.vim --- bin/shell-replace | 19 ++++++++++++------- etc/vim/source/functions.vim | 23 +++++++++++++++++++++++ etc/vim/source/vars.vim | 2 +- lib/php/http.php | 2 +- lib/php/mime.php | 2 +- share/db/nb.db | Bin 671744 -> 671744 bytes 6 files changed, 38 insertions(+), 10 deletions(-) diff --git a/bin/shell-replace b/bin/shell-replace index 28c2db0e..f16a5bab 100755 --- a/bin/shell-replace +++ b/bin/shell-replace @@ -33,6 +33,7 @@ my %Opt = ( get_options(\%Opt); #help() unless @ARGV; $main::_DATA_ = undef; +$Opt{find} = 1 if $Opt{'find-only'}; ################################################################################# # @@ -47,6 +48,7 @@ no warnings 'File::Find'; #$_ = "nb_api '/pub/mime/ls/type,ext.php_hash' | sed \"s/^/\$(printf '\\t\\t')/\""; #$_ = "nb_api /pub/mime/ls/type,ext.php_hash"; +#die map {">$_"} &cmd($_); #warn &cmd($_); @ARGV = grep {&file_readable($_)} @ARGV if @ARGV; if (!@ARGV and !-t STDIN) { @@ -68,6 +70,7 @@ if ($Opt{find}) { }, @ARGV); #exit; @ARGV = @WANTED_FILES; + exit if $Opt{'find-only'}; } # @@ -225,6 +228,7 @@ sub shell_replace { if ($i==1) { $cmd = $2; push @lines, $line; + #die $cmd; push @lines, map{s/^/$blank/;$_} &cmd($cmd); } elsif ($line =~ /^\s*.{1,3}' \,'xml' : '' \} diff --git a/lib/php/http.php b/lib/php/http.php index e1f85b1d..911d9798 100644 --- a/lib/php/http.php +++ b/lib/php/http.php @@ -1,7 +1,7 @@ SHELL_REPLACE dbq db=$NB_DB t=http_status rows.fields=id,name orderby=id f=php_hash | sed "s/^/\t/" +#>SHELL_REPLACE dbq.php /$NB_DB/http_status/ls/id,name orderby=id format=php_hash preff=$'\t' "100" => "Continue", "101" => "Switching Protocols", "102" => "Processing", diff --git a/lib/php/mime.php b/lib/php/mime.php index 4281854b..549a565a 100644 --- a/lib/php/mime.php +++ b/lib/php/mime.php @@ -1,7 +1,7 @@ SHELL_REPLACE nb_api '/pub/mime/ls/type,ext.php_hash' | sed "s/^/$(printf '\t\t')/" +#>SHELL_REPLACE nb_api "/pub/mime/ls/type,ext.php_hash?preff=%09%09" "application/applixware" => "aw", "application/atomcat+xml" => "atomcat", "application/atomsvc+xml" => "atomsvc", diff --git a/share/db/nb.db b/share/db/nb.db index fabf51c70bf3ee46477bfb7d6e26dd1cca2950de..a0526b5864801c3103a5c85ef05d7870627af57e 100644 GIT binary patch delta 100 zcmZo@&}?YXoFL68HBrWyQEFqta(za|$s7iXj0u~y3`}{%7(@hFRE7C-Gjmh*lJj$O sQ}as7GIN_tZQ4t17=f4xh?#+y1&CRJm<@>8ftUk`Ik%VEaCI{S0HbmpoB#j- delta 100 zcmZo@&}?YXoFL68IZ?)$QF3F#a(zaI$s7iXjPaYb3`}{%L8ftUk`Ik%VEaCI{S0J-xW_W%F@ -- 2.47.3