@ 260915.5

260226.8 · c12849a11264e2c81c860bf78ee9039772f307a4

fix #511

reading declarations

completions/zsh/_ug

@@ -40,6 +40,7 @@ $matchers{-E,--extended-regexp}'[Interpret patterns as extended regular expressi '(1)*'--exclude-fs=-'[Exclude file systems specified by MOUNTS from recursive searches]' $matchers{-F,--fixed-strings}'[Interpret pattern as a set of fixed strings, separated by newlines, any of which is to be matched]' '(1)*'{-f,--file=-}'[Read newline-separated patterns from FILE]:FILE:_files'+{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' --filter=-'[Filter files through the specified COMMANDS first before searching]' --filter-magic-label=-'[Associate LABEL with files whose signature "magic bytes" match the MAGIC regex pattern]' --format=-'[Output FORMAT-formatted matches]'@@ -80,6 +81,8 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B {-m,--min-count=-,--max-count=-}'[Require MIN matches, stop after MAX matches when specified]:MIN,MAX:( )::(1 1, 1,10)' --match'[Match all input]' --max-files=-'[Restrict the number of files matched to NUM]'+--max-size=-'[Only search files whose size is less than or equal to MAX bytes]'+--min-size=-'[Only search files whose size is greater than or euqal to MIN bytes]' --mmap'[Use memory maps to search files]' {-N,--neg-regexp=-}'[Specify a negative PATTERN to reject specific -e PATTERN matches with a counter pattern]:PATTERN:( )' {-n,--line-number}'[Each output line is preceded by its relative line number in the file, starting at line 1]'@@ -89,7 +92,6 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B '(1)*'{-O,--file-extension=-}'[Only search files whose filename extensions match the specified comma-separated list of EXTENSIONS, same as -g *.ext for each]:EXT:( )' {-o,--only-matching}'[Only the matching part of a pattern match is output]' --only-line-number'[Only the line number of a matching line is output]'-{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression using PCRE2]' {-p,--no-dereference}'[If -R or -r is specified, do not follow symbolic links, even when symbolic links are specified on the command line]' --pager'[When output is sent to the terminal, uses COMMAND to page through the output]'@@ -110,7 +112,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin '(1)*'{-t,--file-type=-}'[Search only files associated with TYPES, a comma-separated list of file types]:TYPES:(actionscript ada adoc asm asp aspx autoconf automake awk Awk basic batch bison c c++ clojure cpp csharp css csv dart Dart delphi elisp elixir erlang fortran gif Gif go groovy gsp haskell html jade java jpeg Jpeg js json jsp julia kotlin less lex lisp lua m4 make markdown matlab node Node objc objc++ ocaml parrot pascal pdf Pdf perl Perl php Php png Png prolog python Python r rpm Rpm rst rtf Rtf ruby Ruby rust scala scheme seed7 shell Shell smalltalk sql svg swift tcl tex text tiff Tiff tt typescript verilog vhdl vim xml Xml yacc yaml zig )' --tabs'[Set the tab size to NUM to expand tabs for option -k]' --tag'[Disables colors to mark up matches with TAG]'-{--tree,-^}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]'+{--tree,-'^'}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]' {-U,--ascii,--binary}'[Disables Unicode matching for ASCII and binary matching]' {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]'@@ -122,7 +124,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-X,--hex}'[Output matches and matching lines in hexadecimal]' {-x,--line-regexp}'[Select only those matches that exactly match the whole line, as if the patterns are surrounded by ^ and $]' --xml'[Output file matches in XML]'-{-Y,--empty}'[Empty-matching patterns match all lines]'+{-Y,--empty,--grep}'[Empty-matching patterns match all lines]' {-y,--any-line,--passthru}'[Any line is output (passthru)]' $matchers{-Z-,--fuzzy=-}'[Fuzzy mode: report approximate pattern matches within MAX errors]:DIST:(1 +1 -1 \~1 +-1 +~1 +-~1 -~1 best1 best+1 best-1 best~1 best+-1 best+~1 best+-~1 best-~1)' {-z,--decompress}'[Search compressed files and archives]'

completions/zsh/_ug+

@@ -40,6 +40,7 @@ $matchers{-E,--extended-regexp}'[Interpret patterns as extended regular expressi '(1)*'--exclude-fs=-'[Exclude file systems specified by MOUNTS from recursive searches]' $matchers{-F,--fixed-strings}'[Interpret pattern as a set of fixed strings, separated by newlines, any of which is to be matched]' '(1)*'{-f,--file=-}'[Read newline-separated patterns from FILE]:FILE:_files'+{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' --filter=-'[Filter files through the specified COMMANDS first before searching]' --filter-magic-label=-'[Associate LABEL with files whose signature "magic bytes" match the MAGIC regex pattern]' --format=-'[Output FORMAT-formatted matches]'@@ -80,6 +81,8 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B {-m,--min-count=-,--max-count=-}'[Require MIN matches, stop after MAX matches when specified]:MIN,MAX:( )::(1 1, 1,10)' --match'[Match all input]' --max-files=-'[Restrict the number of files matched to NUM]'+--max-size=-'[Only search files whose size is less than or equal to MAX bytes]'+--min-size=-'[Only search files whose size is greater than or euqal to MIN bytes]' --mmap'[Use memory maps to search files]' {-N,--neg-regexp=-}'[Specify a negative PATTERN to reject specific -e PATTERN matches with a counter pattern]:PATTERN:( )' {-n,--line-number}'[Each output line is preceded by its relative line number in the file, starting at line 1]'@@ -89,7 +92,6 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B '(1)*'{-O,--file-extension=-}'[Only search files whose filename extensions match the specified comma-separated list of EXTENSIONS, same as -g *.ext for each]:EXT:( )' {-o,--only-matching}'[Only the matching part of a pattern match is output]' --only-line-number'[Only the line number of a matching line is output]'-{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression using PCRE2]' {-p,--no-dereference}'[If -R or -r is specified, do not follow symbolic links, even when symbolic links are specified on the command line]' --pager'[When output is sent to the terminal, uses COMMAND to page through the output]'@@ -110,7 +112,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin '(1)*'{-t,--file-type=-}'[Search only files associated with TYPES, a comma-separated list of file types]:TYPES:(actionscript ada adoc asm asp aspx autoconf automake awk Awk basic batch bison c c++ clojure cpp csharp css csv dart Dart delphi elisp elixir erlang fortran gif Gif go groovy gsp haskell html jade java jpeg Jpeg js json jsp julia kotlin less lex lisp lua m4 make markdown matlab node Node objc objc++ ocaml parrot pascal pdf Pdf perl Perl php Php png Png prolog python Python r rpm Rpm rst rtf Rtf ruby Ruby rust scala scheme seed7 shell Shell smalltalk sql svg swift tcl tex text tiff Tiff tt typescript verilog vhdl vim xml Xml yacc yaml zig )' --tabs'[Set the tab size to NUM to expand tabs for option -k]' --tag'[Disables colors to mark up matches with TAG]'-{--tree,-^}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]'+{--tree,-'^'}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]' {-U,--ascii,--binary}'[Disables Unicode matching for ASCII and binary matching]' {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]'@@ -122,7 +124,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-X,--hex}'[Output matches and matching lines in hexadecimal]' {-x,--line-regexp}'[Select only those matches that exactly match the whole line, as if the patterns are surrounded by ^ and $]' --xml'[Output file matches in XML]'-{-Y,--empty}'[Empty-matching patterns match all lines]'+{-Y,--empty,--grep}'[Empty-matching patterns match all lines]' {-y,--any-line,--passthru}'[Any line is output (passthru)]' $matchers{-Z-,--fuzzy=-}'[Fuzzy mode: report approximate pattern matches within MAX errors]:DIST:(1 +1 -1 \~1 +-1 +~1 +-~1 -~1 best1 best+1 best-1 best~1 best+-1 best+~1 best+-~1 best-~1)' {-z,--decompress}'[Search compressed files and archives]'

completions/zsh/_ugrep

@@ -40,6 +40,7 @@ $matchers{-E,--extended-regexp}'[Interpret patterns as extended regular expressi '(1)*'--exclude-fs=-'[Exclude file systems specified by MOUNTS from recursive searches]' $matchers{-F,--fixed-strings}'[Interpret pattern as a set of fixed strings, separated by newlines, any of which is to be matched]' '(1)*'{-f,--file=-}'[Read newline-separated patterns from FILE]:FILE:_files'+{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' --filter=-'[Filter files through the specified COMMANDS first before searching]' --filter-magic-label=-'[Associate LABEL with files whose signature "magic bytes" match the MAGIC regex pattern]' --format=-'[Output FORMAT-formatted matches]'@@ -80,6 +81,8 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B {-m,--min-count=-,--max-count=-}'[Require MIN matches, stop after MAX matches when specified]:MIN,MAX:( )::(1 1, 1,10)' --match'[Match all input]' --max-files=-'[Restrict the number of files matched to NUM]'+--max-size=-'[Only search files whose size is less than or equal to MAX bytes]'+--min-size=-'[Only search files whose size is greater than or euqal to MIN bytes]' --mmap'[Use memory maps to search files]' {-N,--neg-regexp=-}'[Specify a negative PATTERN to reject specific -e PATTERN matches with a counter pattern]:PATTERN:( )' {-n,--line-number}'[Each output line is preceded by its relative line number in the file, starting at line 1]'@@ -89,7 +92,6 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B '(1)*'{-O,--file-extension=-}'[Only search files whose filename extensions match the specified comma-separated list of EXTENSIONS, same as -g *.ext for each]:EXT:( )' {-o,--only-matching}'[Only the matching part of a pattern match is output]' --only-line-number'[Only the line number of a matching line is output]'-{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression using PCRE2]' {-p,--no-dereference}'[If -R or -r is specified, do not follow symbolic links, even when symbolic links are specified on the command line]' --pager'[When output is sent to the terminal, uses COMMAND to page through the output]'@@ -122,7 +124,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-X,--hex}'[Output matches and matching lines in hexadecimal]' {-x,--line-regexp}'[Select only those matches that exactly match the whole line, as if the patterns are surrounded by ^ and $]' --xml'[Output file matches in XML]'-{-Y,--empty}'[Empty-matching patterns match all lines]'+{-Y,--empty,--grep}'[Empty-matching patterns match all lines]' {-y,--any-line,--passthru}'[Any line is output (passthru)]' $matchers{-Z-,--fuzzy=-}'[Fuzzy mode: report approximate pattern matches within MAX errors]:DIST:(1 +1 -1 \~1 +-1 +~1 +-~1 -~1 best1 best+1 best-1 best~1 best+-1 best+~1 best+-~1 best-~1)' {-z,--decompress}'[Search compressed files and archives]'

completions/zsh/_ugrep+

@@ -40,6 +40,7 @@ $matchers{-E,--extended-regexp}'[Interpret patterns as extended regular expressi '(1)*'--exclude-fs=-'[Exclude file systems specified by MOUNTS from recursive searches]' $matchers{-F,--fixed-strings}'[Interpret pattern as a set of fixed strings, separated by newlines, any of which is to be matched]' '(1)*'{-f,--file=-}'[Read newline-separated patterns from FILE]:FILE:_files'+{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' --filter=-'[Filter files through the specified COMMANDS first before searching]' --filter-magic-label=-'[Associate LABEL with files whose signature "magic bytes" match the MAGIC regex pattern]' --format=-'[Output FORMAT-formatted matches]'@@ -80,6 +81,8 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B {-m,--min-count=-,--max-count=-}'[Require MIN matches, stop after MAX matches when specified]:MIN,MAX:( )::(1 1, 1,10)' --match'[Match all input]' --max-files=-'[Restrict the number of files matched to NUM]'+--max-size=-'[Only search files whose size is less than or equal to MAX bytes]'+--min-size=-'[Only search files whose size is greater than or euqal to MIN bytes]' --mmap'[Use memory maps to search files]' {-N,--neg-regexp=-}'[Specify a negative PATTERN to reject specific -e PATTERN matches with a counter pattern]:PATTERN:( )' {-n,--line-number}'[Each output line is preceded by its relative line number in the file, starting at line 1]'@@ -89,7 +92,6 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B '(1)*'{-O,--file-extension=-}'[Only search files whose filename extensions match the specified comma-separated list of EXTENSIONS, same as -g *.ext for each]:EXT:( )' {-o,--only-matching}'[Only the matching part of a pattern match is output]' --only-line-number'[Only the line number of a matching line is output]'-{--files,-%%}'[Boolean file matching mode, the opposite of --lines]' $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression using PCRE2]' {-p,--no-dereference}'[If -R or -r is specified, do not follow symbolic links, even when symbolic links are specified on the command line]' --pager'[When output is sent to the terminal, uses COMMAND to page through the output]'@@ -110,7 +112,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin '(1)*'{-t,--file-type=-}'[Search only files associated with TYPES, a comma-separated list of file types]:TYPES:(actionscript ada adoc asm asp aspx autoconf automake awk Awk basic batch bison c c++ clojure cpp csharp css csv dart Dart delphi elisp elixir erlang fortran gif Gif go groovy gsp haskell html jade java jpeg Jpeg js json jsp julia kotlin less lex lisp lua m4 make markdown matlab node Node objc objc++ ocaml parrot pascal pdf Pdf perl Perl php Php png Png prolog python Python r rpm Rpm rst rtf Rtf ruby Ruby rust scala scheme seed7 shell Shell smalltalk sql svg swift tcl tex text tiff Tiff tt typescript verilog vhdl vim xml Xml yacc yaml zig )' --tabs'[Set the tab size to NUM to expand tabs for option -k]' --tag'[Disables colors to mark up matches with TAG]'-{--tree,-^}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]'+{--tree,-'^'}'[Output directories with matching files in a tree-like format for option -c or --count, -l or --files-with-matches, -L or --files-without-match]' {-U,--ascii,--binary}'[Disables Unicode matching for ASCII and binary matching]' {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]'@@ -122,7 +124,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-X,--hex}'[Output matches and matching lines in hexadecimal]' {-x,--line-regexp}'[Select only those matches that exactly match the whole line, as if the patterns are surrounded by ^ and $]' --xml'[Output file matches in XML]'-{-Y,--empty}'[Empty-matching patterns match all lines]'+{-Y,--empty,--grep}'[Empty-matching patterns match all lines]' {-y,--any-line,--passthru}'[Any line is output (passthru)]' $matchers{-Z-,--fuzzy=-}'[Fuzzy mode: report approximate pattern matches within MAX errors]:DIST:(1 +1 -1 \~1 +-1 +~1 +-~1 -~1 best1 best+1 best-1 best~1 best+-1 best+~1 best+-~1 best-~1)' {-z,--decompress}'[Search compressed files and archives]'

completions/zsh/compgen.sh

@@ -48,6 +48,7 @@ $UGREP --help 2>&1 \     | sed -e :a -e '$!N;s/\n[ ]\{7\}//;ta' -e 'P;D' \     | sed -E -e "s/ /'[/" -e "s/\.?$/\]/" \     | sed -E -e "s/--hexdump/--hexdump=-/" -e "s/--sort'/--sort=-'/" -e "s/-Z,--fuzzy/-Z-,--fuzzy=-/" \+    | sed -E -e "s/--tree,-\^/--tree,-'^'/" \     | sed -E -e "/\{-D/s/$/:ACTION:(read skip)/" -e "/\{-d/s/$/:ACTION:(read recurse skip)/" \     | sed -E -e "/\{-g/s/$/:GLOB:( )/" -e "/\{-[eMN]/s/$/:PATTERN:( )/" -e "/\{-f/s/$/:FILE:_files/" -e "/\{-[ABCJ]/s/$/:NUM:( )/" -e "/\{-[Km]/s/$/:MIN,MAX:( )/" -e "/\{-O/s/$/:EXT:( )/" \     | sed -E -e "/\{-t/s/$/:TYPES:($TYPES)/" -e "/--encoding/s/$/:ENCODING:($ENCODING)/" \

src/zopen.c

@@ -669,8 +669,10 @@ getcode(struct s_zstate *zs) 		bits -= 8; 	} -	/* High order bits. */-	gcode |= (*bp & rmask[bits]) << r_off;+	/* High order bits. (RvE) fixed to avoid reading one byte past gbuf[] */+        if (bp < gbuf + sizeof(gbuf))+          gcode |= (*bp & rmask[bits]) << r_off;+ 	roffset += n_bits;  	return (gcode);