@ 260915.5

220207.1 · f0a43b41c4595fd7a1270897eddc0dbf4500c2a3

released 3.7.2

New --hexdump options; --ignore-files improvement; speed improvements.

reading declarations

.gitignore

@@ -32,6 +32,9 @@ bin/ug bin/ugrep src/ugrep +# Git+.git/+ # Autotools .deps/ .dirstamp@@ -52,4 +55,3 @@ msvc/*.vcxproj.user .DS_Store/ *.dSYM/ *.swp-

Makefile.am

@@ -46,18 +46,19 @@ install-data-hook: 		 echo "|                                                      |"; \ 		 echo "| Aliases to consider:                                 |"; \ 		 echo "|   alias uq     = 'ug -Q'                             |"; \-		 echo "|   alias ux     = 'ug -UX'                            |"; \+		 echo "|   alias ux     = 'ug -U --hexdump'                   |"; \ 		 echo "|   alias uz     = 'ug -z'                             |"; \+		 echo "|   alias ugit   = 'ug --ignore-files'                 |"; \ 		 echo "|   alias grep   = 'ugrep -G'                          |"; \ 		 echo "|   alias egrep  = 'ugrep -E'                          |"; \ 		 echo "|   alias fgrep  = 'ugrep -F'                          |"; \ 		 echo "|   alias pgrep  = 'ugrep -P'                          |"; \-		 echo "|   alias xgrep  = 'ugrep -UX'                         |"; \+		 echo "|   alias xgrep  = 'ugrep -U --hexdump'                |"; \ 		 echo "|   alias zgrep  = 'ugrep -zG'                         |"; \ 		 echo "|   alias zegrep = 'ugrep -zE'                         |"; \ 		 echo "|   alias zfgrep = 'ugrep -zF'                         |"; \ 		 echo "|   alias zpgrep = 'ugrep -zP'                         |"; \-		 echo "|   alias zxgrep = 'ugrep -zUX'                        |"; \+		 echo "|   alias zxgrep = 'ugrep -zU --hexdump'               |"; \ 		 echo "|   alias xdump  = 'ugrep -X \"\"'                       |"; \ 		 echo "|                                                      |"; \ 		 echo "| Thank you for using ugrep!                           |"; \

Makefile.in

@@ -930,18 +930,19 @@ install-data-hook: 		 echo "|                                                      |"; \ 		 echo "| Aliases to consider:                                 |"; \ 		 echo "|   alias uq     = 'ug -Q'                             |"; \-		 echo "|   alias ux     = 'ug -UX'                            |"; \+		 echo "|   alias ux     = 'ug -U --hexdump'                   |"; \ 		 echo "|   alias uz     = 'ug -z'                             |"; \+		 echo "|   alias ugit   = 'ug --ignore-files'                 |"; \ 		 echo "|   alias grep   = 'ugrep -G'                          |"; \ 		 echo "|   alias egrep  = 'ugrep -E'                          |"; \ 		 echo "|   alias fgrep  = 'ugrep -F'                          |"; \ 		 echo "|   alias pgrep  = 'ugrep -P'                          |"; \-		 echo "|   alias xgrep  = 'ugrep -UX'                         |"; \+		 echo "|   alias xgrep  = 'ugrep -U --hexdump'                |"; \ 		 echo "|   alias zgrep  = 'ugrep -zG'                         |"; \ 		 echo "|   alias zegrep = 'ugrep -zE'                         |"; \ 		 echo "|   alias zfgrep = 'ugrep -zF'                         |"; \ 		 echo "|   alias zpgrep = 'ugrep -zP'                         |"; \-		 echo "|   alias zxgrep = 'ugrep -zUX'                        |"; \+		 echo "|   alias zxgrep = 'ugrep -zU --hexdump'               |"; \ 		 echo "|   alias xdump  = 'ugrep -X \"\"'                       |"; \ 		 echo "|                                                      |"; \ 		 echo "| Thank you for using ugrep!                           |"; \

README.md

@@ -4,43 +4,43 @@  Search for anything in everything... ultra fast -*New option -Q opens a query UI to search files as you type!*+*New option -Q opens a query TUI to search files as you type!* <br> <img src="https://www.genivia.com/images/scranim.gif" width="438" alt="">  - Supports all GNU/BSD grep standard options; a compatible replacement for GNU/BSD grep, [see how](#grep) -- Matches Unicode patterns by default in UTF-8, UTF-16, UTF-32 encoded files- - Ultra fast with new match algorithms and features beating grep, ripgrep, silver searcher, ack, sift, etc.  - Written in clean and efficient C++11 for advanced features and speed, thoroughly tested  - Portable (Linux, Unix, MacOS, Windows, etc), includes binaries for Windows in the [releases](https://github.com/Genivia/ugrep/releases) -- Matches multiple lines with `\n` and `\R` patterns (`\n`, `\r\n`,`\r`, `\v`, `\f`, U+0085, U+2028 and U+2029)+- Matches Unicode patterns by default in UTF-8, UTF-16, UTF-32 encoded files++- Matches multiple lines with `\n` and `\R` regex patterns  - Built-in help: `ugrep --help WHAT` displays options related to `WHAT` you need -  > 💡 **Pro Tip:** try `--help help`.  Try `--help regex` and `--help globs`.+  > 💡**ProTip** try `--help help`.  Try `--help regex` and `--help globs`.  - User-friendly with sensible defaults and customizable [configuration files](#config) used by the `ug` command, a short command for `ugrep --config` to load a .ugrep configuration file with your preferences        ug PATTERN ...                         ugrep --config PATTERN ... -  > 💡 **Pro Tip:** `ug --save-config` saves a .ugrep config file in the working directory, overwriting an old.+  > 💡**ProTip** `ug --save-config` saves a .ugrep config file in the working directory, overwriting an old. -- Interactive [query UI](#query), press F1 or CTRL-Z for help and TAB/SHIFT-TAB to navigate to dirs and files+- Interactive [query TUI](#query), press F1 or CTRL-Z for help and TAB/SHIFT-TAB to navigate to dirs and files        ugrep -Q                               ugrep -Q -e PATTERN     -  > 💡 **Pro Tip:** `-Q` replaces `PATTERN` on the command line to type your patterns interactively instead.  Specify `-e PATTERN` to search and edit the `PATTERN` in the UI.  For quicker search responses to keypresses, try `-Q1` (fast, 100ms delay) to `-Q5` (default 500ms delay).+  > 💡**ProTip** `-Q` replaces `PATTERN` on the command line to type your patterns interactively instead.  Specify `-e PATTERN` to search and edit the `PATTERN` in the TUI.  For quicker search responses to keypresses, try `-Q1` (fast, 100ms delay) to `-Q5` (default 500ms delay).  - Find approximate pattern matches with [fuzzy search](#fuzzy), within the specified Levenshtein distance        ugrep -Z PATTERN ...                   ugrep -Z3 PATTTERN ... -  > 💡 **Pro Tip:** `-Zn` matches up to `n` extra, missing or replaced characters, `-Z+n` matches up to `n` extra characters, `-Z-n` matches with up to `n` missing characters and `-Z~n` matches up to `n` replaced characters.  `-Z` defaults to `-Z1`.+  > 💡**ProTip** `-Zn` matches up to `n` extra, missing or replaced characters, `-Z+n` matches up to `n` extra characters, `-Z-n` matches with up to `n` missing characters and `-Z~n` matches up to `n` replaced characters.  `-Z` defaults to `-Z1`.  - Search with Google-like [Boolean query patterns](#bool) using `--bool` patterns with `AND` (or just space), `OR` (or a bar `|`), `NOT` (or a dash `-`), using quotes to match exactly, and grouping with `( )`; or with options `-e` (as an "or"), `--and`, `--andnot`, and `--not` regex patterns @@ -52,19 +52,19 @@ Search for anything in everything... ultra fast    where `A`, `B` and `C` are arbitrary regex patterns (use option `-F` to search strings) -  > 💡 **Pro Tip:** specify `--files --bool` to apply the Boolean query to files as a whole: a file matches if all Boolean conditions are satisfied by matching patterns file-wide.  Otherwise, Boolean conditions apply to single lines by default, since grep utilities are generally line-based pattern matchers.  Option `--stats` displays the query in human-readable form after the search completes.+  > 💡**ProTip** specify `--files --bool` to apply the Boolean query to files as a whole: a file matches if all Boolean conditions are satisfied by matching patterns file-wide.  Otherwise, Boolean conditions apply to single lines by default, since grep utilities are generally line-based pattern matchers.  Option `--stats` displays the query in human-readable form after the search completes.  - Fzf-like search with regex (or fixed strings with `-F`), fuzzy matching with up to 4 extra characters with `-Z+4` and words only with `-w`, using `--files --bool` for file-wide Boolean searches        ugrep -Q1 --files --bool -l -w -Z+4 --sort=best -  > 💡 **Pro Tip:** `-l` lists the matching files in the UI, press `TAB` then `ALT-y` to view a file, `SHIFT-TAB` and `Alt-l` to go back to view the list of matching files ordered by best match+  > 💡**ProTip** `-l` lists the matching files in the TUI, press `TAB` then `ALT-y` to view a file, `SHIFT-TAB` and `Alt-l` to go back to view the list of matching files ordered by best match  - Search the contents of [archives](#archives) (cpio, jar, tar, pax, zip) and [compressed files](#archives) (zip, gz, Z, bz, bz2, lzma, xz, lz4, zstd)        ugrep -z PATTERN ...                   ugrep -z --zmax=2 PATTERN ... -  > 💡 **Pro Tip:** specify `-z --zmax=2` to search compressed files and archives nested within archives, e.g. to search zip files stored in (compressed) tar files.  The `--zmax` argument may range from 1 (default) to 99 for up to 99 decompression and de-archiving steps (far more than you will ever need!)  Larger `--zmax` slows searching.+  > 💡**ProTip** specify `-z --zmax=2` to search compressed files and archives nested within archives, e.g. to search zip files stored in (compressed) tar files.  The `--zmax` argument may range from 1 (default) to 99 for up to 99 decompression and de-archiving steps, far more than you will ever need!  Larger `--zmax` slows searching.  - Search pdf, doc, docx, xls, xlxs, and more [using filters](#filter) @@ -73,12 +73,15 @@ Search for anything in everything... ultra fast       ugrep --filter='pem:openssl x509 -text,cer,crt,der:openssl x509 -text -inform der' PATTERN ...       ugrep --filter='latin1:iconv -f LATIN1 -t UTF-8' PATTERN ... -  > 💡 **Pro Tip:** filters are selected based on the specified list of filename extensions.  Filters can be any commands (including your own scripts and executables) that take standard input to produce standard output.+  > 💡**ProTip** filters are selected based on the specified list of filename extensions.  Filters can be any commands (including your own scripts and executables) that take standard input to produce standard output. -- Search [binary files](#binary) and display hexdumps with binary pattern matches (Unicode text or raw byte patterns)+- Search [binary files](#binary) and display hexdumps with binary pattern matches (Unicode text or `-U` for byte patterns) -      ugrep -W TEXTPATTERN ...               ugrep -X TEXTPATTERN ...-      ugrep -W -U BYTEPATTERN ...            ugrep -X -U BYTEPATTERN ...+      ugrep --hexdump -U BYTEPATTERN ...     ugrep --hexdump TEXTPATTERN ...+      ugrep -X -U BYTEPATTERN ...            ugrep -X TEXTPATTERN ...+      ugrep -W -U BYTEPATTERN ...            ugrep -W TEXTPATTERN ...++  > 💡**ProTip** `--hexdump=4chC1` displays `4` columns of hex without a character column `c`, no hex spacing `h`, and with one extra hex line `C1` before and after a match.  Option `-X` is the same as `--hexdump=2C` with `2` columns of hex and the whole matching line as `C` context in hex.  - Include files to search by [filename extensions](#magic) or exclude them with `^` @@ -125,7 +128,7 @@ Search for anything in everything... ultra fast       ugrep --csv PATTERN ...                ugrep --json PATTERN ...       ugrep --xml PATTERN ...                ugrep --format='file=%f line=%n match=%O%~' PATTERN ... -  > 💡 **Pro Tip:** `--help format` displays help on format `%` fields.+  > 💡**ProTip** `--help format` displays help on format `%` fields.  - Search with PCRE's Perl-compatible regex patterns and display or replace [subpattern matches](#replace) @@ -136,7 +139,7 @@ Search for anything in everything... ultra fast       ugrep --replace='(%m:%o)' PATTERN ...  ugrep -y --replace='(%m:%o)' PATTERN ...       ugrep -P --replace='%1' PATTERN ...    ugrep -y -P --replace='%1' PATTERN ... -  > 💡 **Pro Tip:** `--help format` displays help on format `%` fields.+  > 💡**ProTip** `--help format` displays help on format `%` fields.  - Search files with a specific [encoding](#encoding) format such as ISO-8859-1 thru 16, CP 437, CP 850, MACROMAN, KOI8, etc. @@ -626,24 +629,25 @@ exactly like `egrep`, matching only ASCII/LATIN1 non-UTF Unicode patterns, permitting empty patterns to match and search hidden files instead of ignoring them, respectively.  See [grep equivalence](#equivalence). -You can create [convenient grep aliases](#aliases) for **ugrep** with or-without options `-U`, `-Y` and `-.` or include other options as desired, or-create additional `grep`, `egrep` and `fgrep` executables.+- You can create [convenient grep aliases](#aliases) with or without options+  `-U`, `-Y` and `-.` or include other options as desired. -When the `ugrep` (or `ugrep.exe`) executable is copied as `grep` (`grep.exe`),-`egrep` (`egrep.exe`), `fgrep` (`fgrep.exe`), then option `-U`, `-Y` and `-.`-are automatically enabled together with either `-G` for `grep`, `-E` for-`egrep` and `-F` for `fgrep`.  In addition, when copied as `zgrep`, `zegrep`-and `zfgrep`, option `-z` is enabled.  For example, when `ugrep` is copied as-`zegrep`, options `-z`, `-E`, `-Y` and `-.` are enabled.+- Or you can create `grep`, `egrep` and `fgrep` executables by copying `ugrep`+  to those names.  When the `ugrep` (or `ugrep.exe`) executable is copied as+  `grep` (`grep.exe`), `egrep` (`egrep.exe`), `fgrep` (`fgrep.exe`), then+  option `-U`, `-Y` and `-.` are automatically enabled together with either+  `-G` for `grep`, `-E` for `egrep` and `-F` for `fgrep`.  In addition, when+  copied as `zgrep`, `zegrep` and `zfgrep`, option `-z` is enabled.  For+  example, when `ugrep` is copied as `zegrep`, options `-z`, `-E`, `-Y` and+  `-.` are enabled. -Instead of copying files, symlinks and hard links to `ugrep` work fine too.-For example, to create a symlink `egrep`:+- Likewise, symlinks and hard links to `ugrep` work fine too to create `grep`,+  `egrep` and `fgrep` replacements.  For example, to create a symlink `egrep`: -    sudo ln -s `which ugrep` /opt/local/bin/egrep+      sudo ln -s `which ugrep` /opt/local/bin/egrep -The `/opt/local/bin` is just an example and may or may not be in your `$path`-and may or may not be found when executing `egrep` depending on your `$path`.+  The `/opt/local/bin` is just an example and may or may not be in your `$path`+  and may or may not be found when executing `egrep` depending on your `$path`.  <a name="equivalence"/> @@ -687,7 +691,7 @@ where:  Commonly-used aliases to add to `.bashrc` to increase productivity: -    alias uq     = 'ug -Q'       # short & quick query UI (interactive, uses .ugrep config)+    alias uq     = 'ug -Q'       # short & quick query TUI (interactive, uses .ugrep config)     alias ux     = 'ug -UX'      # short & quick binary pattern search (uses .ugrep config)     alias uz     = 'ug -z'       # short & quick compressed files and archives search (uses .ugrep config) @@ -722,7 +726,7 @@ and [`soffice`](https://www.libreoffice.org) to be installed.  See  ### Notable improvements over grep -- **ugrep** starts an interactive query UI with option `-Q`.+- **ugrep** starts an interactive query TUI with option `-Q`. - **ugrep** matches patterns across multiple lines when patterns match `\n`. - **ugrep** matches full Unicode by default (disabled with option `-U`). - **ugrep** supports fuzzy (approximate) matching with option `-Z`.@@ -834,7 +838,7 @@ files:      ugrep -tc++ main -Same, using the interactive query UI, starting with the initial search pattern+Same, using the interactive query TUI, starting with the initial search pattern `main` (note that `-Q` with an initial pattern requires option `-e` because patterns are normally specified interactively and all command line arguments are considered files/directories):@@ -943,7 +947,7 @@ simple and use them in combination for more complex tasks. Say we want to produce a sorted list of all identifiers found in Java source code while skipping strings and comments: -    ugrep -R -tjava -f java/names -f java/zap_strings -f java/zap_comments myproject | sort -u+    ugrep -R -tjava -f java/names myproject | sort -u  This matches Java Unicode identifiers using the regex `\p{JavaIdentifierStart}\p{JavaIdentifierPart}*` defined in@@ -1040,7 +1044,7 @@ To show a list of `-t TYPES` option values:      ugrep -tlist -In the interactive query UI, press F1 or CTRL-Z for help and options:+In the interactive query TUI, press F1 or CTRL-Z for help and options:      ugrep -Q @@ -1162,7 +1166,7 @@ This option starts a user interface to enter search patterns interactively:   preceded by a `!` or a `^`, skips files whose name matches the glob When a   glob contains a `/`, full pathnames are matched.  Otherwise basenames are   matched.  When a glob ends with a `/`, directories are matched.-- The query UI prompt switches between `Q>` (normal), `F>` (fixed strings),+- The query TUI prompt switches between `Q>` (normal), `F>` (fixed strings),   `G>` (basic regex), `P>` (Perl matching), and `Z>` (fuzzy matching).   When the `--glob=` prompt is shown, a comma-separated list of gitignore-style   glob patterns may be entered.  Presssing ESC returns control to the pattern@@ -1199,7 +1203,7 @@ This option starts a user interface to enter search patterns interactively: - To avoid long pathnames to obscure the view, `--heading` is enabled by   default.  Press Alt-+ to switch headings off. -Query UI key mapping:+Query TUI key mapping:  key(s)                  | function ----------------------- | -------------------------------------------------@@ -1220,8 +1224,8 @@ key(s)                  | function `Alt-Down`              | move display down by 1/2 page (MacOS `Shift-Down`) `Alt-Left`              | move display left by 1/2 page (MacOS `Shift-Left`) `Alt-Right`             | move display right by 1/2 page (MacOS `Shift-Right`)-`Home` `Ctrl-A`         | move cursor to the beginning of line-`End` `Ctrl-E`          | move cursor to the end of line+`Home` `Ctrl-A`         | move cursor to the beginning of the line+`End` `Ctrl-E`          | move cursor to the end of the line `Ctrl-K`                | delete after cursor `Ctrl-L`                | refresh screen `Ctrl-O`+`key`          | toggle ugrep command-line option corresponding to `key`, same as `Alt-key`@@ -1872,13 +1876,12 @@ instead of a single word:             is encountered in recursive searches.  The default FILE is             `.gitignore'.  Matching files and directories located in the             directory of a FILE's location and in directories below are ignored-            by temporarily overriding the --exclude and --exclude-dir globs,-            as if --exclude-from=FILE is locally enforced.  Globbing is the-            same as --exclude-from=FILE and supports gitignore syntax, but-            directories are not automatically excluded from searches (use a-            glob ending with a `/' to identify directories to ignore, same as-            git).  Files and directories explicitly specified as command line-            arguments are never ignored.  This option may be repeated.+            by temporarily extending the --exclude and --exclude-dir globs, as+            if --exclude-from=FILE is locally enforced.  Globbing syntax is the+            same as the --exclude-from=FILE gitignore syntax; directories are+            excluded when the glob ends in a `/', same as git.  Files and+            directories explicitly specified as command line arguments are+            never ignored.  This option may be repeated with additional files.     -g GLOBS, --glob=GLOBS             Search only files whose name matches the specified comma-separated             list of GLOBS, same as --include='glob' for each `glob' in GLOBS.@@ -2147,13 +2150,12 @@ search the files:             is encountered in recursive searches.  The default FILE is             `.gitignore'.  Matching files and directories located in the             directory of a FILE's location and in directories below are ignored-            by temporarily overriding the --exclude and --exclude-dir globs,-            as if --exclude-from=FILE is locally enforced.  Globbing is the-            same as --exclude-from=FILE and supports gitignore syntax, but-            directories are not automatically excluded from searches (use a-            glob ending with a `/' to identify directories to ignore, same as-            git).  Files and directories explicitly specified as command line-            arguments are never ignored.  This option may be repeated.+            by temporarily extending the --exclude and --exclude-dir globs, as+            if --exclude-from=FILE is locally enforced.  Globbing syntax is the+            same as the --exclude-from=FILE gitignore syntax; directories are+            excluded when the glob ends in a `/', same as git.  Files and+            directories explicitly specified as command line arguments are+            never ignored.  This option may be repeated with additional files.     -M MAGIC, --file-magic=MAGIC             Only files matching the signature pattern MAGIC are searched.  The             signature \"magic bytes\" at the start of a file are compared to@@ -2220,16 +2222,16 @@ import statements, including hidden files with `-.`:  ### Fuzzy search with -Z -    -Z[MAX], --fuzzy[=MAX]+    -Z[+-~][MAX], --fuzzy=[+-~][MAX]             Fuzzy mode: report approximate pattern matches within MAX errors.-            By default, MAX is 1: one deletion, insertion or substitution is-            allowed.  When `+' and/or `-' precedes MAX, only insertions and/or-            deletions are allowed.  When `~' precedes MAX, substitution counts-            as one error.  For example, -Z+~3 allows up to three insertions or-            substitutions, but no deletions.  The first character of an-            approximate match always matches the beginning of a pattern.  Option-            --sort=best orders matching files by best match.  No whitespace may-            be given between -Z and its argument.+            The default is -Z1: one deletion, insertion or substitution is+            allowed.  If `+`, `-' and/or `~' is specified, then `+' allows+            insertions, `-' allows deletions and `~' allows substitutions.  For+            example, -Z+~3 allows up to three insertions or substitutions, but+            no deletions.  The first character of an approximate match always+            matches the start of a pattern.  Option --sort=best orders matching+            files by best match.  No whitespace may be given between -Z and its+            argument.  The beginning of a pattern always matches the first character of an approximate match as a practical strategy to prevent many false "randomized" matches for@@ -2478,20 +2480,32 @@ meaning; any name or string that does not contain a `:` or `,` may be used.             represented by the UTF-8 sequence C2 A3.  See also --dotall.     -W, --with-hex             Output binary matches in hexadecimal, leaving text matches alone.-            This option is equivalent to the --binary-files=with-hex option.+            This option is equivalent to the --binary-files=with-hex option+            with --hexdump=2C.  To omit the matching line from the hex output,+            combine option --hexdump with option -W.  See also option -U.     -X, --hex             Output matches in hexadecimal.  This option is equivalent to the-            --binary-files=hex option.-    --hexdump=[1-8][a][b][c][h]+            --binary-files=hex option with --hexdump=2C.  To omit the matching+            line from the hex output, use option --hexdump instead of -X.  See+            also option -U.+    --hexdump=[1-8][a][bch][A[NUM]][B[NUM]][C[NUM]]             Output matches in 1 to 8 columns of 8 hexadecimal octets.  The             default is 2 columns or 16 octets per line.  Option `a' outputs a             `*' for all hex lines that are identical to the previous hex line,-            `b' removes all space breaks, `c' removes the character column and-            `h' removes hex spacing.  Enables -X if -W or -X is not specified.+            `b' removes all space breaks, `c' removes the character column, `h'+            removes hex spacing, `A' includes up to NUM hex lines after the+            match, `B' includes up to NUM hex lines before the match and `C'+            includes up to NUM hex lines.  When NUM is omitted, the matching+            line is included in the output.  See also options -U, -W and -X.     --dotall             Dot `.' in regular expressions matches anything, including newline.             Note that `.*' matches all input and should not be used. +Note that `--hexdump` differs from `-X` by omitting the matching line from the+hex output, showing only the matching pattern using a minimal number of hex+lines.  Option `-X` is the same as `--hexdump=2C` to display the matching line+as hex `C` context.+ To search a file for ASCII words, displaying text lines as usual while binary content is shown in hex with `-U` and `-W`: @@ -2518,19 +2532,19 @@ line-based option does not permit matching patterns with newlines):  Same, compacted to 32 bytes per line without the character column: -    ugrep -U --hexdump=4bc -y '\x00+' myfile+    ugrep -UX -y '\x00+' myfile  To match the binary pattern `A3..A3.` (hex) in a binary file without Unicode pattern matching (which would otherwise match `\xaf` as a Unicode character U+00A3 with UTF-8 byte sequence C2 A3) and display the results-in hex with `-X` with pager `less -R`:+in compact hex with `--hexdump` with pager `less -R`: -    ugrep --pager -o -UX '\xa3[\x00-\xff]{2}\xa3[\x00-\xff]' a.out+    ugrep --pager --hexdump -U '\xa3[\x00-\xff]{2}\xa3[\x00-\xff]' a.out  Same, but using option `--dotall` to let `.` match any byte, including newline that is not matched by dot (the default as required by grep): -    ugrep --dotall --pager -o -UX '\xa3.{2}\xa3.' a.out+    ugrep --dotall --pager --hexdump -U '\xa3.{2}\xa3.' a.out  To list all files containing a RPM signature, located in the `rpm` directory and recursively below (see for example@@ -2575,20 +2589,19 @@ source):             is encountered in recursive searches.  The default FILE is             `.gitignore'.  Matching files and directories located in the             directory of a FILE's location and in directories below are ignored-            by temporarily overriding the --exclude and --exclude-dir globs,-            as if --exclude-from=FILE is locally enforced.  Globbing is the-            same as --exclude-from=FILE and supports gitignore syntax, but-            directories are not automatically excluded from searches (use a-            glob ending with a `/' to identify directories to ignore, same as-            git).  Files and directories explicitly specified as command line-            arguments are never ignored.  This option may be repeated.+            by temporarily extending the --exclude and --exclude-dir globs, as+            if --exclude-from=FILE is locally enforced.  Globbing syntax is the+            same as the --exclude-from=FILE gitignore syntax; directories are+            excluded when the glob ends in a `/', same as git.  Files and+            directories explicitly specified as command line arguments are+            never ignored.  This option may be repeated with additional files.  Option `--ignore-files` looks for `.gitignore`, or the specified `FILE`, in-recursive searches.  When found, the `.gitignore` file is used to exclude the-files and directories matching the globs in `.gitignore` in the directory tree-rooted at the `.gitignore` location by temporarily overriding the `--exclude`-and `--exclude-dir` globs, i.e. the `.gitignore` exclusions are applied-precisely and exclusively.  Use `--stats` to show the selection criteria+recursive searches.  When `.gitignore`, or the specified `FILE`, is found while+traversing directory tree branches down, the `.gitignore` file is used to+temporarily extend the previous exclusions with the additional globs in+`.gitignore` to apply the combined exclusions to the directory tree rooted at+the `.gitignore` location.  Use `--stats` to show the selection criteria applied to the search results and the locations of each `FILE` found.  To avoid confusion, files and directories specified as command-line arguments to **ugrep** are never ignored.@@ -2742,7 +2755,7 @@ pattern    | matches `[abc-e]`  | one character `a`,`b`,`c`,`d`,`e` `[^abc-e]` | one character not `a`,`b`,`c`,`d`,`e`,`/` `[!abc-e]` | one character not `a`,`b`,`c`,`d`,`e`,`/`-`/`        | when used at the beginning of a glob, matches working directory+`/`        | when used at the start of a glob, matches working directory `**/`      | zero or more directories `/**`      | when at the end of a glob, matches everything after the `/` `\?`       | a `?` or any other character specified after the backslash@@ -4068,44 +4081,46 @@ in markdown:                   `--help globs' displays an overview of glob syntax  and  conven-                   tions. -           --hexdump=[1-8][a][b][c][h]+           --hexdump=[1-8][a][bch][A[NUM]][B[NUM]][C[NUM]]                   Output  matches  in 1 to 8 columns of 8 hexadecimal octets.  The                   default is 2 columns or 16 octets per line.  Option `a'  outputs                   a  `*'  for all hex lines that are identical to the previous hex                   line, `b' removes all space breaks, `c'  removes  the  character-                  column  and  `h' removes hex spacing.  Enables -X if -W or -X is-                  not specified.+                  column,  `h'  removes  hex  spacing,  `A' includes up to NUM hex+                  lines after the match, `B' includes up to NUM hex  lines  before+                  the  match  and  `C'  includes up to NUM hex lines.  When NUM is+                  omitted, the matching line is included in the output.  See  also+                  options -U, -W and -X.             --hidden, -.                   Search hidden files and directories.             --hyperlink-                  Hyperlinks are enabled for file names when colors  are  enabled.+                  Hyperlinks  are  enabled for file names when colors are enabled.                   Same as --colors=hl.             -I, --ignore-binary-                  Ignore  matches  in  binary files.  This option is equivalent to+                  Ignore matches in binary files.  This option  is  equivalent  to                   the --binary-files=without-match option.             -i, --ignore-case-                  Perform case insensitive matching.  By default,  ugrep  is  case-                  sensitive.   By  default,  this  option applies to ASCII letters+                  Perform  case  insensitive  matching.  By default, ugrep is case+                  sensitive.  By default, this option  applies  to  ASCII  letters                   only.  Use options -P and -i for Unicode case insensitive match-                   ing.             --ignore-files[=FILE]-                  Ignore  files  and  directories  matching the globs in each FILE-                  that is encountered in recursive searches.  The default FILE  is-                  `.gitignore'.   Matching  files  and  directories located in the-                  directory of a FILE's location  and  in  directories  below  are-                  ignored    by   temporarily   overriding   the   --exclude   and-                  --exclude-dir  globs,  as  if  --exclude-from=FILE  is   locally-                  enforced.   Globbing is the same as --exclude-from=FILE and sup--                  ports gitignore syntax, but directories  are  not  automatically-                  excluded from searches (use a glob ending with a `/' to identify-                  directories to ignore, same  as  git).   Files  and  directories-                  explicitly   specified  as  command  line  arguments  are  never-                  ignored.  This option may be repeated.+                  Ignore files and directories matching the  globs  in  each  FILE+                  that  is encountered in recursive searches.  The default FILE is+                  `.gitignore'.  Matching files and  directories  located  in  the+                  directory  of  a  FILE's  location  and in directories below are+                  ignored by temporarily extending the --exclude and --exclude-dir+                  globs,  as if --exclude-from=FILE is locally enforced.  Globbing+                  syntax is the same as the --exclude-from=FILE gitignore  syntax;+                  directories  are  excluded  when the glob ends in a `/', same as+                  git.  Files and directories explicitly specified as command line+                  arguments  are  never ignored.  This option may be repeated with+                  additional files.             --include=GLOB                   Search only files whose name matches GLOB using wildcard  match-@@ -4438,7 +4453,9 @@ in markdown:            -W, --with-hex                   Output binary  matches  in  hexadecimal,  leaving  text  matches                   alone.  This option is equivalent to the --binary-files=with-hex-                  option.+                  option with --hexdump=2C.  To omit the matching  line  from  the+                  hex  output,  combine option --hexdump with option -W.  See also+                  option -U.             -w, --word-regexp                   The PATTERN is searched for as a word, such  that  the  matching@@ -4453,7 +4470,9 @@ in markdown:             -X, --hex                   Output matches in hexadecimal.  This option is equivalent to the-                  --binary-files=hex option.  See also option --hexdump.+                  --binary-files=hex option with --hexdump=2C.  To omit the match-+                  ing line from the hex output, use option  --hexdump  instead  of+                  -X.  See also option -U.             -x, --line-regexp                   Select  only those matches that exactly match the whole line, as@@ -4475,61 +4494,60 @@ in markdown:                   Any line is output (passthru).  Non-matching lines are output as                   context with a `-' separator.  See also options -A, -B and -C. -           -Z[[+-~]MAX], --fuzzy[=[+-~]MAX]+           -Z[+-~][MAX], --fuzzy=[+-~][MAX]                   Fuzzy  mode:  report  approximate  pattern  matches  within  MAX-                  errors.  By default, MAX is 1: one deletion, insertion  or  sub--                  stitution  is  allowed.   When  `+' and/or `-' precede MAX, only-                  insertions and/or deletions are allowed, respectively.  When `~'-                  precedes  MAX,  substitution  counts as one error.  For example,-                  -Z+~3 allows up to three insertions  or  substitutions,  but  no-                  deletions.   The  first character of an approximate match always-                  matches the beginning  of  a  pattern. Option --sort=best orders-                  matching  files  by  best  match.   No  whitespace  may be given-                  between -Z and its argument.+                  errors.  The default is -Z1: one deletion, insertion or  substi-+                  tution  is  allowed.   If `+`, `-' and/or `~' is specified, then+                  `+' allows insertions, `-' allows deletions and `~' allows  sub-+                  stitutions.  For example, -Z+~3 allows up to three insertions or+                  substitutions, but no deletions.   The  first  character  of  an+                  approximate match always matches the start of a pattern.  Option+                  --sort=best orders matching files by best match.  No  whitespace+                  may be given between -Z and its argument.             -z, --decompress-                  Decompress files to search, when compressed.   Archives  (.cpio,-                  .pax,  .tar  and .zip) and compressed archives (e.g. .taz, .tgz,-                  .tpz, .tbz, .tbz2, .tb2, .tz2, .tlz, .txz, .tzst)  are  searched-                  and  matching  pathnames  of  files  in  archives  are output in-                  braces.  If -g, -O, -M,  or  -t  is  specified,  searches  files-                  stored  in  archives whose filenames match globs, match filename-                  extensions, match file signature  magic  bytes,  or  match  file+                  Decompress  files  to search, when compressed.  Archives (.cpio,+                  .pax, .tar and .zip) and compressed archives (e.g.  .taz,  .tgz,+                  .tpz,  .tbz,  .tbz2, .tb2, .tz2, .tlz, .txz, .tzst) are searched+                  and matching pathnames  of  files  in  archives  are  output  in+                  braces.   If  -g,  -O,  -M,  or  -t is specified, searches files+                  stored in archives whose filenames match globs,  match  filename+                  extensions,  match  file  signature  magic  bytes, or match file                   types, respectively.  Supported compression formats: gzip (.gz),-                  compress (.Z), zip, bzip2 (requires suffix  .bz,  .bz2,  .bzip2,-                  .tbz,  .tbz2,  .tb2,  .tz2), lzma and xz (requires suffix .lzma,-                  .tlz, .xz, .txz), lz4 (requires  suffix  .lz4),  zstd  (requires+                  compress  (.Z),  zip,  bzip2 (requires suffix .bz, .bz2, .bzip2,+                  .tbz, .tbz2, .tb2, .tz2), lzma and xz  (requires  suffix  .lzma,+                  .tlz,  .xz,  .txz),  lz4  (requires suffix .lz4), zstd (requires                   suffix .zst, .zstd, .tzst).             --zmax=NUM-                  When  used  with option -z (--decompress), searches the contents+                  When used with option -z (--decompress), searches  the  contents                   of compressed files and archives stored within archives by up to-                  NUM  recursive  expansions.   The  default --zmax=1 only permits-                  searching uncompressed files stored in cpio, pax,  tar  and  zip-                  archives;  compressed  files and archives are detected as binary-                  files and are effectively ignored.  Specify --zmax=2  to  search-                  compressed  files  and archives stored in cpio, pax, tar and zip+                  NUM recursive expansions.  The  default  --zmax=1  only  permits+                  searching  uncompressed  files  stored in cpio, pax, tar and zip+                  archives; compressed files and archives are detected  as  binary+                  files  and  are effectively ignored.  Specify --zmax=2 to search+                  compressed files and archives stored in cpio, pax, tar  and  zip                   archives.  NUM may range from 1 to 99 for up to 99 decompression-                  and   de-archiving   steps.   Increasing  NUM  values  gradually+                  and  de-archiving  steps.   Increasing  NUM   values   gradually                   degrades performance.             -0, --null-                  Prints a zero-byte (NUL) after the file name.  This  option  can-                  be  used  with commands such as `find -print0' and `xargs -0' to+                  Prints  a  zero-byte (NUL) after the file name.  This option can+                  be used with commands such as `find -print0' and `xargs  -0'  to                   process arbitrary file names. -           A `--' signals the end of options; the rest of the parameters are  FILE+           A  `--' signals the end of options; the rest of the parameters are FILE            arguments, allowing filenames to begin with a `-' character.             Long options may start with `--no-' to disable, when applicable. -           The  regular expression pattern syntax is an extended form of the POSIX+           The regular expression pattern syntax is an extended form of the  POSIX            ERE syntax.  For an overview of the syntax see README.md or visit:                    https://github.com/Genivia/ugrep -           Note that `.' matches any non-newline character.  Pattern `\n'  matches-           a  newline character.  Multiple lines may be matched with patterns that+           Note  that `.' matches any non-newline character.  Pattern `\n' matches+           a newline character.  Multiple lines may be matched with patterns  that            match one or more newline characters.      EXIT STATUS@@ -4541,54 +4559,54 @@ in markdown:             >1     An error occurred. -           If -q or --quiet or --silent is used and a line is selected,  the  exit+           If  -q  or --quiet or --silent is used and a line is selected, the exit            status is 0 even if an error occurred.      CONFIGURATION-           The  ug command is intended for context-dependent interactive searching-           and is equivalent to the ugrep --config command  to  load  the  default+           The ug command is intended for context-dependent interactive  searching+           and  is  equivalent  to  the ugrep --config command to load the default            configuration file `.ugrep' when present in the working directory or in            the home directory.             A configuration file contains `NAME=VALUE' pairs per line, where `NAME`-           is  the  name  of a long option (without `--') and `=VALUE' is an argu--           ment, which is optional and may be omitted  depending  on  the  option.+           is the name of a long option (without `--') and `=VALUE'  is  an  argu-+           ment,  which  is  optional  and may be omitted depending on the option.            Empty lines and lines starting with a `#' are ignored. -           The  --config=FILE  option  and  its  abbreviated form ---FILE load the-           specified configuration file located in the working directory or,  when-           not  found,  located  in the home directory.  An error is produced when+           The --config=FILE option and its  abbreviated  form  ---FILE  load  the+           specified  configuration file located in the working directory or, when+           not found, located in the home directory.  An error  is  produced  when            FILE is not found or cannot be read. -           Command line options are parsed in the following order: the  configura--           tion  file is loaded first, followed by the remaining options and argu-+           Command  line options are parsed in the following order: the configura-+           tion file is loaded first, followed by the remaining options and  argu-            ments on the command line. -           The --save-config option saves a `.ugrep'  configuration  file  to  the-           working  directory  with  a subset of the current options.  The --save--           config=FILE option saves the configuration to FILE.  The  configuration+           The  --save-config  option  saves  a `.ugrep' configuration file to the+           working directory with a subset of the current  options.   The  --save-+           config=FILE  option saves the configuration to FILE.  The configuration            is written to standard output when FILE is a `-'.      GLOBBING-           Globbing  is  used  by options -g, --include, --include-dir, --include--           from, --exclude, --exclude-dir, --exclude-from  and  --ignore-files  to-           match  pathnames  and  basenames in recursive searches.  Glob arguments+           Globbing is used by options -g,  --include,  --include-dir,  --include-+           from,  --exclude,  --exclude-dir,  --exclude-from and --ignore-files to+           match pathnames and basenames in recursive  searches.   Glob  arguments            for these options should be quoted to prevent shell globbing. -           Globbing supports  gitignore  syntax  and  the  corresponding  matching-           rules,  except  that a glob normally matches files but not directories.+           Globbing  supports  gitignore  syntax  and  the  corresponding matching+           rules, except that a glob normally matches files but  not  directories.            If a glob ends in a path separator `/', then it matches directories but-           not  files,  as if --include-dir or --exclude-dir is specified.  When a+           not files, as if --include-dir or --exclude-dir is specified.   When  a            glob contains a path separator `/', the full pathname is matched.  Oth--           erwise  the  basename  of a file or directory is matched.  For example,-           *.h matches foo.h and bar/foo.h.  bar/*.h  matches  bar/foo.h  but  not-           foo.h  and not bar/bar/foo.h.  Use a leading `/' to force /*.h to match+           erwise the basename of a file or directory is  matched.   For  example,+           *.h  matches  foo.h  and  bar/foo.h.  bar/*.h matches bar/foo.h but not+           foo.h and not bar/bar/foo.h.  Use a leading `/' to force /*.h to  match            foo.h but not bar/foo.h. -           When a glob starts with a `^' or a `!' as  in  -g^GLOB,  the  match  is+           When  a  glob  starts  with  a `^' or a `!' as in -g^GLOB, the match is            negated.  Likewise, a `!' (but not a `^') may be used with globs in the-           files specified --include-from, --exclude-from, and  --ignore-files  to-           negate  the  glob  match.  Empty lines or lines starting with a `#' are+           files  specified  --include-from, --exclude-from, and --ignore-files to+           negate the glob match.  Empty lines or lines starting with  a  `#'  are            ignored.             Glob Syntax and Conventions@@ -4606,14 +4624,14 @@ in markdown:            [!abc-e]                   Matches one character not a,b,c,d,e,/. -           /      When used at the beginning of a glob, matches if pathname has no  /.+           /      When  used at the start of a glob, matches if pathname has no /.                   When used at the end of a glob, matches directories only.             **/    Matches zero or more directories. -           /**    When  used at the end of a glob, matches everything after the /.+           /**    When used at the end of a glob, matches everything after the  /. -           \?     Matches a ? or any other character  specified  after  the  back-+           \?     Matches  a  ?  or  any other character specified after the back-                   slash.             Glob Matching Examples@@ -4649,46 +4667,46 @@ in markdown:             a\?b   Matches a?b,                 but not a, b, ab, axb, a/b -           Note  that  exclude  glob patterns take priority over include glob pat--           terns  when  specified  with  options  -g,  --exclude,   --exclude-dir,+           Note that exclude glob patterns take priority over  include  glob  pat-+           terns   when  specified  with  options  -g,  --exclude,  --exclude-dir,            --include and include-dir. -           Glob  patterns specified with prefix `!' in any of the files associated-           with --include-from, --exclude-from and --ignore-files  will  negate  a-           previous  glob match.  That is, any matching file or directory excluded-           by a previous glob pattern  specified  in  the  files  associated  with-           --exclude-from  or --ignore-file will become included again.  Likewise,-           any matching file or directory included  by  a  previous  glob  pattern-           specified  in  the  files  associated  with  --include-from will become+           Glob patterns specified with prefix `!' in any of the files  associated+           with  --include-from,  --exclude-from  and --ignore-files will negate a+           previous glob match.  That is, any matching file or directory  excluded+           by  a  previous  glob  pattern  specified  in the files associated with+           --exclude-from or --ignore-file will become included again.   Likewise,+           any  matching  file  or  directory  included by a previous glob pattern+           specified in the  files  associated  with  --include-from  will  become            excluded again.      ENVIRONMENT            GREP_PATH-                  May be used to specify a file path to pattern files.   The  file-                  path  is used by option -f to open a pattern file, when the pat-+                  May  be  used to specify a file path to pattern files.  The file+                  path is used by option -f to open a pattern file, when the  pat-                   tern file does not exist.             GREP_COLOR-                  May be used to specify ANSI SGR parameters to highlight  matches-                  when  option --color is used, e.g. 1;35;40 shows pattern matches+                  May  be used to specify ANSI SGR parameters to highlight matches+                  when option --color is used, e.g. 1;35;40 shows pattern  matches                   in bold magenta text on a black background.  Deprecated in favor                   of GREP_COLORS, but still supported.             GREP_COLORS-                  May  be used to specify ANSI SGR parameters to highlight matches-                  and other attributes when option --color is used.  Its value  is-                  a  colon-separated  list of ANSI SGR parameters that defaults to+                  May be used to specify ANSI SGR parameters to highlight  matches+                  and  other attributes when option --color is used.  Its value is+                  a colon-separated list of ANSI SGR parameters that  defaults  to                   cx=33:mt=1;31:fn=1;35:ln=1;32:cn=1;32:bn=1;32:se=36.   The  mt=,-                  ms=,  and  mc=  capabilities  of  GREP_COLORS take priority over+                  ms=, and mc= capabilities  of  GREP_COLORS  take  priority  over                   GREP_COLOR.  Option --colors takes priority over GREP_COLORS.      GREP_COLORS-           Colors are specified as string of colon-separated ANSI  SGR  parameters-           of  the  form  `what=substring', where `substring' is a semicolon-sepa--           rated list of ANSI SGR codes or `k' (black), `r'  (red),  `g'  (green),-           `y'  (yellow),  `b'  (blue),  `m'  (magenta),  `c' (cyan), `w' (white).-           Upper case specifies background colors.  A `+'  qualifies  a  color  as-           bright.   A  foreground and a background color may be combined with one+           Colors  are  specified as string of colon-separated ANSI SGR parameters+           of the form `what=substring', where `substring'  is  a  semicolon-sepa-+           rated  list  of  ANSI SGR codes or `k' (black), `r' (red), `g' (green),+           `y' (yellow), `b' (blue),  `m'  (magenta),  `c'  (cyan),  `w'  (white).+           Upper  case  specifies  background  colors.  A `+' qualifies a color as+           bright.  A foreground and a background color may be combined  with  one            or more font properties `n' (normal), `f' (faint), `h' (highlight), `i'            (invert), `u' (underline).  Substrings may be specified for: @@ -4700,10 +4718,10 @@ in markdown:             mt=    SGR substring for matching text in any matching line. -           ms=    SGR  substring  for  matching text in a selected line.  The sub-+           ms=    SGR substring for matching text in a selected  line.   The  sub-                   string mt= by default. -           mc=    SGR substring for matching text in a  context  line.   The  sub-+           mc=    SGR  substring  for  matching  text in a context line.  The sub-                   string mt= by default.             fn=    SGR substring for filenames.@@ -4718,12 +4736,12 @@ in markdown:             rv     a Boolean parameter, switches sl= and cx= with option -v. -           hl     a  Boolean parameter, enables filename hyperlinks (\33]8;;link).+           hl     a Boolean parameter, enables filename hyperlinks  (\33]8;;link).             ne     a Boolean parameter, disables ``erase in line'' \33[K.      FORMAT-           Option --format=FORMAT specifies an output  format  for  file  matches.+           Option  --format=FORMAT  specifies  an  output format for file matches.            Fields may be used in FORMAT, which expand into the following values:             %[ARG]F@@ -4823,53 +4841,53 @@ in markdown:             %u     select unique lines only, unless option -u is used. -           %1     the  first  regex  group  capture  of the match, and so on up to+           %1     the first regex group capture of the match,  and  so  on  up  to                   group %9, same as %[1]#; requires option -P.             %[NUM]#                   the regex group capture NUM; requires option -P.             %[NUM]b-                  the byte offset of the group capture NUM;  requires  option  -P.+                  the  byte  offset  of the group capture NUM; requires option -P.                   Use e for the ending byte offset and d for the byte length.             %[NUM1|NUM2|...]#                   the first group capture NUM that matched; requires option -P.             %[NUM1|NUM2|...]b-                  the  byte  offset  of  the first group capture NUM that matched;-                  requires option -P.  Use e for the ending byte offset and d  for+                  the byte offset of the first group  capture  NUM  that  matched;+                  requires  option -P.  Use e for the ending byte offset and d for                   the byte length.             %[NAME]#-                  the  NAMEd  group capture; requires option -P and capturing pat-+                  the NAMEd group capture; requires option -P and  capturing  pat-                   tern `(?<NAME>PATTERN)', see also %G.             %[NAME]b-                  the byte offset of the NAMEd group capture; requires  option  -P-                  and  capturing pattern `(?<NAME>PATTERN)'.  Use e for the ending+                  the  byte  offset of the NAMEd group capture; requires option -P+                  and capturing pattern `(?<NAME>PATTERN)'.  Use e for the  ending                   byte offset and d for the byte length.             %[NAME1|NAME2|...]#-                  the first NAMEd group capture that matched; requires  option  -P+                  the  first  NAMEd group capture that matched; requires option -P                   and capturing pattern `(?<NAME>PATTERN)', see also %G.             %[NAME1|NAME2|...]b-                  the  byte  offset of the first NAMEd group capture that matched;-                  requires option -P  and  capturing  pattern  `(?<NAME>PATTERN)'.+                  the byte offset of the first NAMEd group capture  that  matched;+                  requires  option  -P  and  capturing pattern `(?<NAME>PATTERN)'.                   Use e for the ending byte offset and d for the byte length. -           %G     list  of  group  capture  indices/names  that  matched; requires+           %G     list of  group  capture  indices/names  that  matched;  requires                   option -P.             %[TEXT1|TEXT2|...]G-                  list of TEXT indexed by  group  capture  indices  that  matched;+                  list  of  TEXT  indexed  by  group capture indices that matched;                   requires option -P.             %g     the group capture index/name matched or 1; requires option -P.             %[TEXT1|TEXT2|...]g-                  the  first  TEXT  indexed  by the first group capture index that+                  the first TEXT indexed by the first  group  capture  index  that                   matched; requires option -P.             %%     the percentage sign.@@ -4877,22 +4895,22 @@ in markdown:            Formatted output is written without a terminating newline, unless %~ or            `\n' is explicitly specified in the format string. -           The  [ARG]  part  of  a  field  is  optional  and may be omitted.  When-           present, the argument must be placed in [] brackets, for example  %[,]F+           The [ARG] part of a  field  is  optional  and  may  be  omitted.   When+           present,  the argument must be placed in [] brackets, for example %[,]F            to output a comma, the pathname, and a separator.             %[SEP]$ and %u are switches and do not send anything to the output. -           The  separator  used by the %F, %H, %N, %K, %B, %S and %G fields may be+           The separator used by the %F, %H, %N, %K, %B, %S and %G fields  may  be            changed by preceding the field by %[SEP]$.  When [SEP] is not provided,-           this  reverts  the  separator to the default separator or the separator+           this reverts the separator to the default separator  or  the  separator            specified with --separator.             Formatted output is written for each matching pattern, which means that-           a  line may be output multiple times when patterns match more than once-           on the same line.  If field  %u  is  specified  anywhere  in  a  format+           a line may be output multiple times when patterns match more than  once+           on  the  same  line.   If  field  %u  is specified anywhere in a format            string,  matching  lines  are  output  only  once,  unless  option  -u,-           --ungroup is specified or when more than one line of input matched  the+           --ungroup  is specified or when more than one line of input matched the            search pattern.             Additional formatting options:@@ -4909,8 +4927,8 @@ in markdown:            --format-end=FORMAT                   the FORMAT when ending the search. -           The  context  options  -A,  -B,  -C,  -y,  and display options --break,-           --heading, --color, -T, and --null have no effect on formatted  output.+           The context options -A,  -B,  -C,  -y,  and  display  options  --break,+           --heading,  --color, -T, and --null have no effect on formatted output.      EXAMPLES            Display lines containing the word `patricia' in `myfile.txt':@@ -4971,7 +4989,7 @@ in markdown:                    $ ugrep -n -f c++/comments myfile.cpp -           List the lines that need fixing in a C/C++ source file by  looking  for+           List  the  lines that need fixing in a C/C++ source file by looking for            the word `FIXME' while skipping any `FIXME' in quoted strings:                    $ ugrep -e FIXME -N '"(\\.|\\\r?\n|[^\\\n"])*"' myfile.cpp@@ -5001,7 +5019,7 @@ in markdown:                    $ ugrep -z -tc++ -n FIXME project.tgz -           Recursively  find  lines with `FIXME' in C/C++ files, but do not search+           Recursively find lines with `FIXME' in C/C++ files, but do  not  search            any `bak' and `old' directories:                    $ ugrep -n FIXME -tc++ -g^bak/,^old/@@ -5011,16 +5029,17 @@ in markdown:                    $ ugrep -z -w --filter='pdf:pdftotext % -' copyright -           Match  the  binary  pattern `A3hhhhA3hh' (hex) in a binary file without-           Unicode pattern matching -U (which would otherwise match  `\xaf'  as  a-           Unicode  character  U+00A3  with UTF-8 byte sequence C2 A3) and display-           the results in hex with -X using `less -R' as a pager:+           Match the binary pattern `A3hhhhA3' (hex) in a binary file without Uni-+           code  pattern matching -U (which would otherwise match `\xaf' as a Uni-+           code character U+00A3 with UTF-8 byte sequence C2 A3) and  display  the+           results in hex with --hexdump with C1 to output one hex line before and+           after each match: -                  $ ugrep --pager -UXo '\xa3[\x00-\xff]{2}\xa3[\x00-\xff]' a.out+                  $ ugrep -U --hexdump=C1 '\xa3[\x00-\xff]{2}\xa3' a.out -           Hexdump an entire file:+           Hexdump an entire file using a pager for viewing: -                  $ ugrep -X '' a.out+                  $ ugrep -X --pager '' a.out             List all files that are not ignored by one or more `.gitignore': @@ -5064,7 +5083,7 @@ in markdown:   -    ugrep 3.7.1                    January 27, 2022                       UGREP(1)+    ugrep 3.7.2                    February 07, 2022                      UGREP(1)  🔝 [Back to table of contents](#toc) @@ -5126,9 +5145,9 @@ sub-expression patterns `φ` and `ψ`:   `(?:φ)`   | matches `φ` as a group without capture   `(?=φ)`   | matches `φ` without consuming it, i.e. lookahead (without option `-P`: nothing may occur after `(?=φ)`)   `(?^φ)`   | matches `φ` and ignores it, marking everything in the pattern as a non-match-  `^φ`      | matches `φ` at the beginning of input or beginning of a line (nothing may occur before `^`)+  `^φ`      | matches `φ` at the start of input or start of a line (nothing may occur before `^`)   `φ$`      | matches `φ` at the end of input or end of a line (nothing may occur after `$`)-  `\Aφ`     | matches `φ` at the beginning of input (nothing may occur before `\A`)+  `\Aφ`     | matches `φ` at the start of input (nothing may occur before `\A`)   `φ\z`     | matches `φ` at the end of input (nothing may occur after `\z`)   `\bφ`     | matches `φ` starting at a word boundary (without option `-P`: nothing may occur before `\b`)   `φ\b`     | matches `φ` ending at a word boundary (without option `-P`: nothing may occur after `\b`)

bin/win32/ugrep.exe

Binary file changed

bin/win64/ugrep.exe

Binary file changed

include/reflex/absmatcher.h

@@ -1073,7 +1073,7 @@ class AbstractMatcher {     return bol_;   }   /// Returns pointer to the end of the line (last char + 1) in the buffer containing the matched text, DANGER: invalidates previous bol() and text() pointers, use eol() before bol(), text(), begin(), and end() when those are used.-  inline const char *eol(bool inclusive = false) ///< true if inclusive, i.e. point after \n+  inline const char *eol(bool inclusive = false) ///< true if inclusive, i.e. point after \n instead of at \n     /// @returns pointer to the end of line   {     if (chr_ == '\n' || (txt_ + len_ < buf_ + end_ && txt_[len_] == '\n'))

include/reflex/pattern.h

@@ -891,7 +891,7 @@ class Pattern {       const DFA::State *start,       int               nest,       bool              peek) const;-  void export_dfa(const DFA::State *start) const;+  void graph_dfa(const DFA::State *start) const;   void export_code() const;   void predict_match_dfa(DFA::State *start);   void gen_predict_match(DFA::State *state);

lib/pattern.cpp

@@ -1188,10 +1188,7 @@ void Pattern::parse4(   }   else if (c == ')')   {-    if (begin)-      error(regex_error::empty_expression, loc++);-    else-      error(regex_error::mismatched_parens, loc++);+    error(begin ? regex_error::empty_expression : regex_error::mismatched_parens, loc++);   }   else if (c == '}')   {@@ -2454,14 +2451,17 @@ void Pattern::assemble(DFA::State *start)   timer_type t;   timer_start(t);   predict_match_dfa(start);-  export_dfa(start);+  graph_dfa(start);   compact_dfa(start);   encode_dfa(start);   wms_ = timer_elapsed(t);-  if (opt_.o)-    gencode_dfa(start);-  else-    export_code();+  if (!opt_.f.empty())+  {+    if (opt_.o)+      gencode_dfa(start);+    else+      export_code();+  }   DBGLOG("END assemble()"); } @@ -2529,6 +2529,7 @@ void Pattern::encode_dfa(DFA::State *start)   nop_ = 0;   for (DFA::State *state = start; state; state = state->next)   {+    // clamp max accept     if (state->accept > Const::AMAX)       state->accept = Const::AMAX;     state->first = state->index = nop_;@@ -2672,23 +2673,7 @@ void Pattern::encode_dfa(DFA::State *start)       Char hi = i->second.first;       Index target_first = i->second.second != NULL ? i->second.second->first : Const::IMAX;       Index target_index = i->second.second != NULL ? i->second.second->index : Const::IMAX;-      if (!is_meta(lo))-      {-        if (target_index == Const::IMAX)-        {-          opcode[pc++] = opcode_goto(lo, hi, Const::HALT);-        }-        else if (nop_ > Const::LONG && ((target_first > state->first && target_first >= Const::LONG / 2) || target_index >= Const::LONG))-        {-          opcode[pc++] = opcode_goto(lo, hi, Const::LONG);-          opcode[pc++] = opcode_long(target_index);-        }-        else-        {-          opcode[pc++] = opcode_goto(lo, hi, target_index);-        }-      }-      else+      if (is_meta(lo))       {         do         {@@ -2707,6 +2692,22 @@ void Pattern::encode_dfa(DFA::State *start)           }         } while (++lo <= hi);       }+      else+      {+        if (target_index == Const::IMAX)+        {+          opcode[pc++] = opcode_goto(lo, hi, Const::HALT);+        }+        else if (nop_ > Const::LONG && ((target_first > state->first && target_first >= Const::LONG / 2) || target_index >= Const::LONG))+        {+          opcode[pc++] = opcode_goto(lo, hi, Const::LONG);+          opcode[pc++] = opcode_long(target_index);+        }+        else+        {+          opcode[pc++] = opcode_goto(lo, hi, target_index);+        }+      }     } #else     for (DFA::State::Edges::const_reverse_iterator i = state->edges.rbegin(); i != state->edges.rend(); ++i)@@ -2829,17 +2830,7 @@ void Pattern::gencode_dfa(const DFA::State *start) const             Char hi = i->first;             Char lo = i->second.first; #endif-            if (!is_meta(lo))-            {-              Index target_index = Const::IMAX;-              if (i->second.second != NULL)-                target_index = i->second.second->index;-              DFA::State::Edges::const_reverse_iterator j = i;-              if (target_index == Const::IMAX && (++j == state->edges.rend() || is_meta(j->second.first)))-                break;-              peek = true;-            }-            else+            if (is_meta(lo))             {               do               {@@ -2852,6 +2843,16 @@ void Pattern::gencode_dfa(const DFA::State *start) const                 check_dfa_closure(i->second.second, 1, peek, prev);               } while (++lo <= hi);             }+            else+            {+              Index target_index = Const::IMAX;+              if (i->second.second != NULL)+                target_index = i->second.second->index;+              DFA::State::Edges::const_reverse_iterator j = i;+              if (target_index == Const::IMAX && (++j == state->edges.rend() || is_meta(j->second.first)))+                break;+              peek = true;+            }           }           bool read = peek;           bool elif = false;@@ -2871,44 +2872,7 @@ void Pattern::gencode_dfa(const DFA::State *start) const                 ::fprintf(file, "  c1 = m.FSM_CHAR();\n");               read = false;             }-            if (!is_meta(lo))-            {-              DFA::State::Edges::const_reverse_iterator j = i;-              if (target_index == Const::IMAX && (++j == state->edges.rend() || is_meta(j->second.first)))-                break;-              if (lo == hi)-              {-                ::fprintf(file, "  if (c1 == ");-                print_char(file, lo);-                ::fprintf(file, ")");-              }-              else if (hi == 0xFF)-              {-                ::fprintf(file, "  if (");-                print_char(file, lo);-                ::fprintf(file, " <= c1)");-              }-              else-              {-                ::fprintf(file, "  if (");-                print_char(file, lo);-                ::fprintf(file, " <= c1 && c1 <= ");-                print_char(file, hi);-                ::fprintf(file, ")");-              }-              if (target_index == Const::IMAX)-              {-                if (peek)-                  ::fprintf(file, " return m.FSM_HALT(c1);\n");-                else-                  ::fprintf(file, " return m.FSM_HALT();\n");-              }-              else-              {-                ::fprintf(file, " goto S%u;\n", target_index);-              }-            }-            else+            if (is_meta(lo))             {               do               {@@ -2946,6 +2910,43 @@ void Pattern::gencode_dfa(const DFA::State *start) const                 }               } while (++lo <= hi);             }+            else+            {+              DFA::State::Edges::const_reverse_iterator j = i;+              if (target_index == Const::IMAX && (++j == state->edges.rend() || is_meta(j->second.first)))+                break;+              if (lo == hi)+              {+                ::fprintf(file, "  if (c1 == ");+                print_char(file, lo);+                ::fprintf(file, ")");+              }+              else if (hi == 0xFF)+              {+                ::fprintf(file, "  if (");+                print_char(file, lo);+                ::fprintf(file, " <= c1)");+              }+              else+              {+                ::fprintf(file, "  if (");+                print_char(file, lo);+                ::fprintf(file, " <= c1 && c1 <= ");+                print_char(file, hi);+                ::fprintf(file, ")");+              }+              if (target_index == Const::IMAX)+              {+                if (peek)+                  ::fprintf(file, " return m.FSM_HALT(c1);\n");+                else+                  ::fprintf(file, " return m.FSM_HALT();\n");+              }+              else+              {+                ::fprintf(file, " goto S%u;\n", target_index);+              }+            }           } #else           for (DFA::State::Edges::const_reverse_iterator i = state->edges.rbegin(); i != state->edges.rend(); ++i)@@ -3169,7 +3170,7 @@ void Pattern::gencode_dfa_closure(FILE *file, const DFA::State *state, int nest,   } } -void Pattern::export_dfa(const DFA::State *start) const+void Pattern::graph_dfa(const DFA::State *start) const {   for (std::vector<std::string>::const_iterator i = opt_.f.begin(); i != opt_.f.end(); ++i)   {

man.sh

@@ -177,7 +177,7 @@ Matches one character not a,b,c,d,e,/. .IP \fB[!abc-e]\fR Matches one character not a,b,c,d,e,/. .IP \fB/\fR-When used at the begin of a glob, matches if pathname has no /.+When used at the start of a glob, matches if pathname has no /. When used at the end of a glob, matches directories only. .IP \fB**/\fR Matches zero or more directories.@@ -543,16 +543,17 @@ compressed and regular files, and in PDFs using a PDF filter: .IP $ ugrep -z -w --filter='pdf:pdftotext % -' copyright .PP-Match the binary pattern `A3hhhhA3hh' (hex) in a binary file without Unicode-pattern matching \fB-U\fR (which would otherwise match `\\xaf' as a-Unicode character U+00A3 with UTF-8 byte sequence C2 A3) and display the-results in hex with \fB-X\fR using `less -R' as a pager:+Match the binary pattern `A3hhhhA3' (hex) in a binary file without Unicode+pattern matching \fB-U\fR (which would otherwise match `\\xaf' as a Unicode+character U+00A3 with UTF-8 byte sequence C2 A3) and display the results in hex+with \fB--hexdump\fR with \fBC1\fR to output one hex line before and after each+match: .IP-$ ugrep --pager -UXo '\\xa3[\\x00-\\xff]{2}\\xa3[\\x00-\\xff]' a.out+$ ugrep -U --hexdump=C1 '\\xa3[\\x00-\\xff]{2}\\xa3' a.out .PP-Hexdump an entire file:+Hexdump an entire file using a pager for viewing: .IP-$ ugrep -X '' a.out+$ ugrep -X --pager '' a.out .PP List all files that are not ignored by one or more `.gitignore': .IP

man/ugrep.1

@@ -1,4 +1,4 @@-.TH UGREP "1" "January 27, 2022" "ugrep 3.7.1" "User Commands"+.TH UGREP "1" "February 07, 2022" "ugrep 3.7.2" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS@@ -349,12 +349,15 @@ In addition, `\fB\-\-help\fR format' displays an overview of FORMAT fields, `\fB\-\-help\fR regex' displays an overview of regular expressions and `\fB\-\-help\fR globs' displays an overview of glob syntax and conventions. .TP-\fB\-\-hexdump\fR=[1\-8][a][b][c][h]+\fB\-\-hexdump\fR=[1\-8][a][bch][A[\fINUM\fR]][B[\fINUM\fR]][C[\fINUM\fR]] Output matches in 1 to 8 columns of 8 hexadecimal octets.  The default is 2 columns or 16 octets per line.  Option `a' outputs a `*' for all hex lines that are identical to the previous hex line,-`b' removes all space breaks, `c' removes the character column and-`h' removes hex spacing.  Enables \fB\-X\fR if \fB\-W\fR or \fB\-X\fR is not specified.+`b' removes all space breaks, `c' removes the character column, `h'+removes hex spacing, `A' includes up to NUM hex lines after the+match, `B' includes up to NUM hex lines before the match and `C'+includes up to NUM hex lines.  When NUM is omitted, the matching+line is included in the output.  See also options \fB\-U\fR, \fB\-W\fR and \fB\-X\fR. .TP \fB\-\-hidden\fR, \fB\-.\fR Search hidden files and directories.@@ -377,13 +380,12 @@ Ignore files and directories matching the globs in each FILE that is encountered in recursive searches.  The default FILE is `.gitignore'.  Matching files and directories located in the directory of a FILE's location and in directories below are ignored-by temporarily overriding the \fB\-\-exclude\fR and \fB\-\-exclude\-dir\fR globs,-as if \fB\-\-exclude\-from\fR=\fIFILE\fR is locally enforced.  Globbing is the-same as \fB\-\-exclude\-from\fR=\fIFILE\fR and supports gitignore syntax, but-directories are not automatically excluded from searches (use a-glob ending with a `/' to identify directories to ignore, same as-git).  Files and directories explicitly specified as command line-arguments are never ignored.  This option may be repeated.+by temporarily extending the \fB\-\-exclude\fR and \fB\-\-exclude\-dir\fR globs, as+if \fB\-\-exclude\-from\fR=\fIFILE\fR is locally enforced.  Globbing syntax is the+same as the \fB\-\-exclude\-from\fR=\fIFILE\fR gitignore syntax; directories are+excluded when the glob ends in a `/', same as git.  Files and+directories explicitly specified as command line arguments are+never ignored.  This option may be repeated with additional files. .TP \fB\-\-include\fR=\fIGLOB\fR Search only files whose name matches GLOB using wildcard matching,@@ -706,7 +708,9 @@ Use COMMAND to view/edit a file in query mode when pressing CTRL\-Y. .TP \fB\-W\fR, \fB\-\-with\-hex\fR Output binary matches in hexadecimal, leaving text matches alone.-This option is equivalent to the \fB\-\-binary\-files\fR=with\-hex option.+This option is equivalent to the \fB\-\-binary\-files\fR=with\-hex option+with \fB\-\-hexdump\fR=2C.  To omit the matching line from the hex output,+combine option \fB\-\-hexdump\fR with option \fB\-W\fR.  See also option \fB\-U\fR. .TP \fB\-w\fR, \fB\-\-word\-regexp\fR The PATTERN is searched for as a word, such that the matching text@@ -720,7 +724,9 @@ patterns to narrow or widen the scope of the PATTERN search. .TP \fB\-X\fR, \fB\-\-hex\fR Output matches in hexadecimal.  This option is equivalent to the-\fB\-\-binary\-files\fR=hex option.  See also option \fB\-\-hexdump\fR.+\fB\-\-binary\-files\fR=hex option with \fB\-\-hexdump\fR=2C.  To omit the matching+line from the hex output, use option \fB\-\-hexdump\fR instead of \fB\-X\fR.  See+also option \fB\-U\fR. .TP \fB\-x\fR, \fB\-\-line\-regexp\fR Select only those matches that exactly match the whole line, as if@@ -743,16 +749,16 @@ not only lines containing the character `x'. Any line is output (passthru).  Non\-matching lines are output as context with a `\-' separator.  See also options \fB\-A\fR, \fB\-B\fR and \fB\-C\fR. .TP-\fB\-Z\fR[[+\-~]MAX], \fB\-\-fuzzy\fR[=[+\-~]MAX]+\fB\-Z\fR[+\-~][\fIMAX\fR], \fB\-\-fuzzy\fR=[+\-~][\fIMAX\fR] Fuzzy mode: report approximate pattern matches within MAX errors.-By default, MAX is 1: one deletion, insertion or substitution is-allowed.  When `+' and/or `\-' precede MAX, only insertions and/or-deletions are allowed, respectively.  When `~' precedes MAX,-substitution counts as one error.  For example, \fB\-Z\fR+~3 allows up to-three insertions or substitutions, but no deletions.  The first-character of an approximate match always matches the begin of a-pattern.  Option \fB\-\-sort\fR=best orders matching files by best match.-No whitespace may be given between \fB\-Z\fR and its argument.+The default is \fB\-Z\fR1: one deletion, insertion or substitution is+allowed.  If `+`, `\-' and/or `~' is specified, then `+' allows+insertions, `\-' allows deletions and `~' allows substitutions.  For+example, \fB\-Z\fR+~3 allows up to three insertions or substitutions, but+no deletions.  The first character of an approximate match always+matches the start of a pattern.  Option \fB\-\-sort\fR=best orders matching+files by best match.  No whitespace may be given between \fB\-Z\fR and its+argument. .TP \fB\-z\fR, \fB\-\-decompress\fR Decompress files to search, when compressed.  Archives (.cpio,@@ -867,7 +873,7 @@ Matches one character not a,b,c,d,e,/. .IP \fB[!abc-e]\fR Matches one character not a,b,c,d,e,/. .IP \fB/\fR-When used at the beginning of a glob, matches if pathname has no /.+When used at the start of a glob, matches if pathname has no /. When used at the end of a glob, matches directories only. .IP \fB**/\fR Matches zero or more directories.@@ -1233,16 +1239,17 @@ compressed and regular files, and in PDFs using a PDF filter: .IP $ ugrep -z -w --filter='pdf:pdftotext % -' copyright .PP-Match the binary pattern `A3hhhhA3hh' (hex) in a binary file without Unicode-pattern matching \fB-U\fR (which would otherwise match `\\xaf' as a-Unicode character U+00A3 with UTF-8 byte sequence C2 A3) and display the-results in hex with \fB-X\fR using `less -R' as a pager:+Match the binary pattern `A3hhhhA3' (hex) in a binary file without Unicode+pattern matching \fB-U\fR (which would otherwise match `\\xaf' as a Unicode+character U+00A3 with UTF-8 byte sequence C2 A3) and display the results in hex+with \fB--hexdump\fR with \fBC1\fR to output one hex line before and after each+match: .IP-$ ugrep --pager -UXo '\\xa3[\\x00-\\xff]{2}\\xa3[\\x00-\\xff]' a.out+$ ugrep -U --hexdump=C1 '\\xa3[\\x00-\\xff]{2}\\xa3' a.out .PP-Hexdump an entire file:+Hexdump an entire file using a pager for viewing: .IP-$ ugrep -X '' a.out+$ ugrep -X --pager '' a.out .PP List all files that are not ignored by one or more `.gitignore': .IP

patterns/c++/README.md

@@ -11,7 +11,7 @@ C++ with Unicode identifiers. - `enums` matches enumerations - `functions` matches function definitions - `includes` matches `#include` lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `namespaces` matches namespace scopes - `strings` matches strings - `structs` matches struct definitions

patterns/c++/names

@@ -1 +1,5 @@ (?u:\p{UnicodeIdentifierStart}\p{UnicodeIdentifierPart}*)+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/c/README.md

@@ -10,7 +10,7 @@ Traditional C with non-Unicode identifiers. - `enums` matches enumerations - `functions` matches function definitions - `includes` matches `#include` lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `structs` matches struct definitions - `typedefs` matches `typedef` lines

patterns/c/names

@@ -1 +1,5 @@ [[:alpha:]_][[:word:]]*+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/cpp/README.md

@@ -11,7 +11,7 @@ C++ with Unicode identifiers. - `enums` matches enumerations - `functions` matches function definitions - `includes` matches `#include` lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `namespaces` matches namespace scopes - `strings` matches strings - `structs` matches struct definitions

patterns/cpp/names

@@ -1 +1,5 @@ (?u:\p{UnicodeIdentifierStart}\p{UnicodeIdentifierPart}*)+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/cs/README.md

@@ -5,7 +5,7 @@ C# patterns - `comments` matches comments - `enums` matches enumerations - `functions` matches function definitions-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `zap_comments` removes comments from matches - `zap_strings` removes strings from matches

patterns/cs/names

@@ -1 +1,5 @@ (?u:\p{JavaIdentifierStart}\p{JavaIdentifierPart}*)+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/java/README.md

@@ -7,7 +7,7 @@ Java patterns - `enums` matches enumerations - `imports` matches import directives - `methods` matches method definitions-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `zap_comments` removes comments from matches - `zap_strings` removes strings from matches

patterns/java/names

@@ -1 +1,5 @@ (?u:\p{JavaIdentifierStart}\p{JavaIdentifierPart}*)+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/js/README.md

@@ -5,7 +5,7 @@ Javascript patterns - `comments` matches comments - `dom` matches DOM document method invocations - `functions` matches function definitions-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `zap_comments` removes comments from matches - `zap_strings` removes strings from matches

patterns/js/names

@@ -1 +1,4 @@ (?u:\p{UnicodeIdentifierStart}\p{UnicodeIdentifierPart}*)+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/perl/README.md

@@ -3,7 +3,7 @@ Perl patterns  - `comments` matches comments - `formats` matches format blocks-- `names` matches identifiers+- `names` matches identifiers not inside strings and comments - `strings` matches strings - `subs` matches subroutine definitions - `zap_comments` removes comments from matches

patterns/perl/names

@@ -1 +1,6 @@ [$@%][[:word:]]*+(?^"(\\.|[^\\"\n])*")+(?^'(\\.|[^\\'\n])*')+(?^\<v\d+(\.\d+)*)+(?^#.*)+(?^^=[[:word:]](.|\n)*?\n=cut)

patterns/php/README.md

@@ -3,7 +3,7 @@ PHP patterns  - `comments` matches comments - `functions` matches function definitions-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `zap_comments` removes comments from matches - `zap_html` removes HTML content outside of `<?php...?>` blocks

patterns/php/names

@@ -1 +1,5 @@ [[:alpha:]_][[:word:]]*+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^#.*)+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/python/README.md

@@ -5,7 +5,7 @@ Python patterns - `defs` matches Python `def` lines - `doc_strings` matches Python docstrings - `imports` matches Python `import` lines-- `names` matches Python identifiers (and keywords)+- `names` matches Python identifiers (and keywords) not inside strings and comments - `string` matches Python strings - `zap_comments` removes Python comments from matches - `zap_strings` removes Python strings from matches

patterns/python/names

@@ -1 +1,6 @@ (?u:\p{PythonIdentifierStart}\p{PythonIdentifierPart}*)+(?^'([^\\\n']|\\.)*')+(?^"([^\\\n"]|\\.)*")+(?^'''('{0,2}[^\\']|\\.|\n)*''')+(?^"""("{0,2}[^\\"]|\\.|\n)*""")+(?^#.*)

patterns/ruby/README.md

@@ -10,7 +10,7 @@ using back references (not yet supported) and lazy quantifiers, using regex - `comments` matches comments - `defs` matches function definition lines - `modules` matches module lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `zap_comments` removes comments from matches - `zap_strings` removes strings from matches

patterns/ruby/names

@@ -1 +1,13 @@ (?u:\p{UnicodeIdentifierStart}\p{UnicodeIdentifierPart}*)+(?^'([^'\\\n]*|\\(.|\n))*')+(?^"([^"\\\n]*|\\(.|\n))*")+(?^%q/[^/\n]*/)+(?^%Q/[^/\n]*/)+(?^%q([^)\n]*))+(?^%Q([^)\n]*))+(?^%q\[[^)\n]*\])+(?^%Q\[[^)\n]*\])+(?^%q\{[^)\n]*\})+(?^%Q\{[^)\n]*\})+(?^#.*)+(?^^=begin(.|\n)*?\n=end)

patterns/rust/README.md

@@ -8,7 +8,7 @@ Rust patterns - `impls` matches implementation definitions - `macros` matches `macro_rules!` definitions - `mods` matches module definitions-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `structs` matches struct definitions - `traits` matches trait definitions

patterns/rust/names

@@ -1 +1,5 @@-[[:alpha:]_][[:word:]]++[[:alpha:]_][[:word:]]*+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/scala/README.md

@@ -5,7 +5,7 @@ Scala patterns - `comments` matches comments - `defs` matches functions - `import` matches import lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `objects` matches object definitions - `packages` matches package lines - `string` matches strings

patterns/scala/names

@@ -1 +1,5 @@ [[:alpha:]_|[:word:]]+(_[-+*/%^<=>!&|?:~#]+)?+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^'(\\.|[^\\\n'])*')+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

patterns/swift/README.md

@@ -6,7 +6,7 @@ Swift patterns - `enums` matches enum definitions - `funcs` matches func definitions - `imports` matches import lines-- `names` matches identifiers (and keywords)+- `names` matches identifiers (and keywords) not inside strings and comments - `strings` matches strings - `structs` matches struct definitions - `zap_comments` removes comments from matches

patterns/swift/names

@@ -1 +1,4 @@-[[:alpha:]_][[:word:]]++[[:alpha:]_][[:word:]]*+(?^"(\\.|\\\r?\n|[^\\\n"])*")+(?^//.*)+(?^/\*([^*]|\n|(\*+([^*/]|\n)))*\*+\/)

src/cnf.cpp

@@ -594,7 +594,7 @@ void CNF::split() // report the CNF in readable form void CNF::report(FILE *output) const {-  if (empty())+  if (empty() && flag_file.empty())     return;    fprintf(output, flag_files ? "Files " : "Lines ");@@ -624,11 +624,14 @@ void CNF::report(FILE *output) const     if (flag_files)       fprintf(output, " a line"); -    // if the first CNF term is left empty then we match -f FILE with additional constraints, i.e. not as an alternation-    if (terms.front().empty())-      fprintf(output, ", and" NEWLINESTR "  ");-    else-      fprintf(output, " or ");+    if (!terms.empty())+    {+      // if the first CNF term is left empty then we match -f FILE with additional constraints, i.e. not as an alternation+      if (terms.front().empty())+        fprintf(output, ", and" NEWLINESTR "  ");+      else+        fprintf(output, " or ");+    }   }    bool and_sep = false;

src/flag.hpp

@@ -83,7 +83,7 @@ extern bool flag_files; extern bool flag_files_with_matches; extern bool flag_files_without_match; extern bool flag_fixed_strings;-extern bool flag_hex_ast;+extern bool flag_hex_star; extern bool flag_hex_cbr; extern bool flag_hex_chr; extern bool flag_hex_hbr;@@ -133,6 +133,8 @@ extern Action flag_directories_action; extern size_t flag_after_context; extern size_t flag_before_context; extern size_t flag_fuzzy;+extern size_t flag_hex_after;+extern size_t flag_hex_before; extern size_t flag_hex_columns; extern size_t flag_jobs; extern size_t flag_max_count;

src/output.cpp

@@ -52,7 +52,7 @@ void Output::Dump::hex(short mode, size_t byte_offset, const char *data, size_t // dump one line of hex void Output::Dump::line() {-  if (flag_hex_ast)+  if (flag_hex_star)   {     // if the previous hex line was the same as this hex line, output a * (but only once)     size_t i;

src/output.hpp

@@ -45,7 +45,7 @@ #include <mutex> #include <condition_variable> -// max hexadecimal columns of bytes per line+// max hexadecimal columns of bytes per line = 8*8 #ifndef MAX_HEX_COLUMNS # define MAX_HEX_COLUMNS 64 #endif

src/query.cpp

@@ -2942,8 +2942,9 @@ void Query::meta(int key)         }         else if (key == '{')         {-          if (!flags_[0].flag && !flags_[1].flag)-            flags_[3].flag = true;+          if (!flags_[26].flag || flag_hexdump == NULL)+            if (!flags_[0].flag && !flags_[1].flag)+              flags_[3].flag = true;            if (context_ > 1)             --context_;@@ -2952,10 +2953,12 @@ void Query::meta(int key)         }         else if (key == '}')         {-          if (flags_[0].flag || flags_[1].flag || flags_[3].flag)+          if (flags_[26].flag && flag_hexdump != NULL)+            ++context_;+          else if (flags_[0].flag || flags_[1].flag || flags_[3].flag)             ++context_;           else if (!flags_[0].flag && !flags_[1].flag)-             flags_[3].flag = true;+            flags_[3].flag = true;            msg.append(" to ").append(std::to_string(context_));         }@@ -3202,6 +3205,16 @@ void Query::get_flags()   else if (flag_before_context > 0)     context_ = flag_before_context; +  if (flag_hexdump != NULL)+  {+    if (flag_hex_after > 0)+      context_ = flag_hex_after;+    else if (flag_hex_before > 0)+      context_ = flag_hex_before;+    else+      context_ = 0;+  }+   // remember the --fuzzy max, when specified   if (flag_fuzzy > 0)     fuzzy_ = flag_fuzzy;@@ -3292,8 +3305,21 @@ void Query::set_flags()   flag_no_messages = true;    // set ugrep flags to the interactive flags-  flag_after_context = context_ * (flags_[0].flag || flags_[3].flag);-  flag_before_context = context_ * (flags_[1].flag || flags_[3].flag);+  if (flags_[26].flag && flag_hexdump != NULL)+  {+    flag_hex_after = flag_hex_before = context_;+    flag_after_context = flag_before_context = 0;+  }+  else+  {+    flag_after_context = context_ * (flags_[0].flag || flags_[3].flag);+    flag_before_context = context_ * (flags_[1].flag || flags_[3].flag);+    if (flag_hexdump != NULL)+    {+      flag_hex_after = (flag_after_context == 0);+      flag_hex_before = (flag_before_context == 0);+    }+  }   flag_byte_offset = flags_[2].flag;   flag_count = flags_[4].flag;   flag_fixed_strings = flags_[5].flag;

src/stats.cpp

@@ -85,7 +85,7 @@ void Stats::report(FILE *output)   for (auto& i : flag_ignore_files)     fprintf(output, "  --ignore-files='%s'" NEWLINESTR, i.c_str());   for (auto& i : ignore)-    fprintf(output, "    %s exclusions were applied to %s" NEWLINESTR, i.c_str(), i.substr(0, i.find_last_of(PATHSEPCHR)).c_str());+    fprintf(output, "    %s exclusions were applied to %s and its subdirectories" NEWLINESTR, i.c_str(), i.substr(0, i.find_last_of(PATHSEPCHR)).c_str());   for (auto& i : flag_file_magic)   {     if (!i.empty() && (i.front() == '!' || i.front() == '^'))

src/ugrep.cpp

@@ -321,7 +321,7 @@ bool flag_files                    = false; bool flag_files_with_matches       = false; bool flag_files_without_match      = false; bool flag_fixed_strings            = false;-bool flag_hex_ast                  = false;+bool flag_hex_star                 = false; bool flag_hex_cbr                  = true; bool flag_hex_chr                  = true; bool flag_hex_hbr                  = true;@@ -371,6 +371,8 @@ Action flag_directories_action     = Action::SKIP; size_t flag_after_context          = 0; size_t flag_before_context         = 0; size_t flag_fuzzy                  = 0;+size_t flag_hex_after              = 0;+size_t flag_hex_before             = 0; size_t flag_hex_columns            = 16; size_t flag_jobs                   = 0; size_t flag_max_count              = 0;@@ -465,7 +467,7 @@ size_t strtonum(const char *string, const char *message); size_t strtopos(const char *string, const char *message); void strtopos2(const char *string, size_t& pos1, size_t& pos2, const char *message, bool optional_first = false); size_t strtofuzzy(const char *string, const char *message);-void split_globs(FILE *file, std::vector<std::string>& files, std::vector<std::string>& dirs);+void import_globs(FILE *file, std::vector<std::string>& files, std::vector<std::string>& dirs); void format(const char *format, size_t matches); void usage(const char *message, const char *arg = NULL, const char *valid = NULL); void help(std::ostream& out);@@ -4189,7 +4191,7 @@ static void save_config()   fprintf(file, "# Enable/disable searching hidden files and directories, default: no-hidden\n%s\n\n", flag_hidden ? "hidden" : "no-hidden");   fprintf(file, "# Enable/disable binary files, default: no-ignore-binary\n%s\n\n", strcmp(flag_binary_files, "without-match") == 0 ? "ignore-binary" : "no-ignore-binary");   fprintf(file, "# Enable/disable decompression and archive search, default: no-decompress\n%s\n\n", flag_decompress ? "decompress" : "no-decompress");-  fprintf(file, "# Maximum decompression and de-archiving levels of recursion, default: 1\nzmax=%zu\n\n", flag_zmax);+  fprintf(file, "# Maximum decompression and de-archiving nesting levels, default: 1\nzmax=%zu\n\n", flag_zmax);   if (flag_ignore_files.empty())   {     fprintf(file, "# Enable/disable ignore files, default: no-ignore-files\nno-ignore-files\n\n");@@ -5516,20 +5518,80 @@ void init(int argc, const char **argv)   // --hexdump: normalize by assigning flags   if (flag_hexdump != NULL)   {-    if (isdigit(*flag_hexdump))+    int context = 0;++    flag_hex_after = (flag_after_context == 0);+    flag_hex_before = (flag_before_context == 0);++    for (const char *s = flag_hexdump; *s != '\0'; ++s)     {-      flag_hex_columns = 8 * (*flag_hexdump - '0');-      if (flag_hex_columns == 0 || flag_hex_columns > MAX_HEX_COLUMNS)-        usage("invalid argument --hexdump=[1-8][a][b][c][h]");+      switch (*s)+      {+        case 'a':+          flag_hex_star = true;+          context = 0;+          break;++        case 'b':+          flag_hex_hbr = flag_hex_cbr = false;+          context = 0;+          break;++        case 'c':+          flag_hex_chr = false;+          context = 0;+          break;++        case 'h':+          flag_hex_hbr = false;+          context = 0;+          break;++        case 'A':+          flag_hex_after = 0;+          context = 1;+          break;++        case 'B':+          flag_hex_before = 0;+          context = 2;+          break;++        case 'C':+          flag_hex_after = flag_hex_before = 0;+          context = 3;+          break;++        default:+          char *r = NULL;+          size_t num = static_cast<size_t>(strtoull(s, &r, 10));+          if (r == NULL)+            usage("invalid argument --hexdump=[1-8][a][bch][A[NUM]][B[NUM]][C[NUM]]");+          s = r - 1;+          switch (context)+          {+            case 0:+              flag_hex_columns = 8 * num;+              if (flag_hex_columns == 0 || flag_hex_columns > MAX_HEX_COLUMNS)+                usage("invalid argument --hexdump=[1-8][a][bch][A[NUM]][B[NUM]][C[NUM]]");+              break;++            case 1:+              flag_hex_after = num + 1;+              break;++            case 2:+              flag_hex_before = num + 1;+              break;++            case 3:+              flag_hex_after = flag_hex_before = num + 1;+              break;+          }+      }     }-    if (strchr(flag_hexdump, 'a') != NULL)-      flag_hex_ast = true;-    if (strchr(flag_hexdump, 'b') != NULL)-      flag_hex_hbr = flag_hex_cbr = false;-    if (strchr(flag_hexdump, 'c') != NULL)-      flag_hex_chr = false;-    if (strchr(flag_hexdump, 'h') != NULL)-      flag_hex_hbr = false;++    // enable option -X if -W is not enabled     if (!flag_with_hex)       flag_hex = true;   }@@ -5863,7 +5925,7 @@ void init(int argc, const char **argv)       if (fopen_smart(&file, from.c_str(), "r") != 0)         error("option --exclude-from: cannot read", from.c_str()); -      split_globs(file, flag_exclude, flag_exclude_dir);+      import_globs(file, flag_exclude, flag_exclude_dir);        if (file != stdin)         fclose(file);@@ -5880,7 +5942,7 @@ void init(int argc, const char **argv)       if (fopen_smart(&file, from.c_str(), "r") != 0)         error("option --include-from: cannot read", from.c_str()); -      split_globs(file, flag_include, flag_include_dir);+      import_globs(file, flag_include, flag_include_dir);        if (file != stdin)         fclose(file);@@ -6586,10 +6648,28 @@ void ugrep()       // the CNF patterns to search, this matches more than necessary to support multiline matching and to highlight all matches in color       regex.assign(bcnf.adjoin()); -      // an empty pattern specified matches every line with ^.* (using ^ to prevent -o from making an extra empty match), including empty lines+      // an empty pattern specified matches every line, including empty lines       if (regex.empty())       {-        regex = flag_hex ? ".*\\n?" : "^.*";+        if (flag_quiet || flag_files_with_matches || flag_files_without_match)+        {+          // regex optimized for speed to match any non-empty file+          regex = "(?s:.)";+        }+        else if (flag_count)+        {+          // regex optimized for speed, but match count needs adjustment later when last line has no \n+          regex = "\\n";+        }+        else if (flag_hex)+        {+          regex = ".*\\n?";+        }+        else+        {+          // use ^.* to prevent -o from making an extra empty match+          regex = "^.*";+        }          // an empty pattern matches every line         flag_empty = true;@@ -6610,7 +6690,25 @@ void ugrep()        if (bcnf.first_empty())       {-        regex = flag_hex ? ".*\\n?" : "^.*";+        if (flag_quiet || flag_files_with_matches || flag_files_without_match)+        {+          // regex optimized for speed to match any non-empty file+          regex = "(?s:.)";+        }+        else if (flag_count)+        {+          // regex optimized for speed, but match count needs adjustment later when last line has no \n+          regex = "\\n";+        }+        else if (flag_hex)+        {+          regex = ".*\\n?";+        }+        else+        {+          // use ^.* to prevent -o from making an extra empty match+          regex = "^.*";+        }          // an empty pattern specified with -e '' matches every line         flag_empty = true;@@ -7775,16 +7873,17 @@ void Grep::recurse(size_t level, const char *pathname)       {         if (!saved)         {-          save_all_exclude = std::unique_ptr<std::vector<std::string>>(new std::vector<std::string>);+          save_all_exclude = std::unique_ptr<std::vector<std::string>>(new std::vector<std::string>(flag_all_exclude));           save_all_exclude->swap(flag_all_exclude);-          save_all_exclude_dir = std::unique_ptr<std::vector<std::string>>(new std::vector<std::string>);++          save_all_exclude_dir = std::unique_ptr<std::vector<std::string>>(new std::vector<std::string>(flag_all_exclude_dir));           save_all_exclude_dir->swap(flag_all_exclude_dir);            saved = true;         }          Stats::ignore_file(filename);-        split_globs(file, flag_all_exclude, flag_all_exclude_dir);+        import_globs(file, flag_all_exclude, flag_all_exclude_dir);         fclose(file);       }     }@@ -7804,7 +7903,7 @@ void Grep::recurse(size_t level, const char *pathname)   {     cFileName.assign(utf8_encode(ffd.cFileName)); -    // search directory entries that aren't . or .. or hidden when --no-hidden is enabled+    // search directory entries that aren't . or .. or hidden     if (cFileName[0] != '.' || (flag_hidden && cFileName[1] != '\0' && cFileName[1] != '.'))     {       size_t len = strlen(pathname);@@ -7869,7 +7968,7 @@ void Grep::recurse(size_t level, const char *pathname)    while ((dirent = readdir(dir)) != NULL)   {-    // search directory entries that aren't . or .. or hidden when --no-hidden is enabled+    // search directory entries that aren't . or .. or hidden     if (dirent->d_name[0] != '.' || (flag_hidden && dirent->d_name[1] != '\0' && dirent->d_name[1] != '.'))     {       size_t len = strlen(pathname);@@ -8172,6 +8271,10 @@ void Grep::search(const char *pathname)       {         // option -q, -l, or -L +        // -v with empty pattern matches nothing+        if (flag_empty && flag_invert_match)+          goto exit_search;+         // --format: whether to out.acquire() early before Stats::found_part()         bool acquire = flag_format != NULL && (flag_format_open != NULL || flag_format_close != NULL); @@ -8204,6 +8307,10 @@ void Grep::search(const char *pathname)           matches = 1;         } +        // --match: adjust for non-empty files that have no \n line ending+        // if (matches == 0 && flag_empty && matcher->last() > 0)+          // matches = 1;+         // -v: invert         if (flag_invert_match)           matches = !matches;@@ -8271,47 +8378,16 @@ void Grep::search(const char *pathname)         // --format: whether to out.acquire() early before Stats::found_part()         bool acquire = flag_format != NULL && (flag_format_open != NULL || flag_format_close != NULL); -        if (flag_ungroup || flag_only_matching)+        if (!flag_empty || !flag_invert_match)         {-          // -co or -cu: count the number of patterns matched in the file--          while (matcher->find())+          if (flag_ungroup || flag_only_matching)           {-            // --range: max line exceeded?-            if (flag_max_line > 0 && matcher->lineno() > flag_max_line)-              break;+            // -co or -cu: count the number of patterns matched in the file -            if (matchers != NULL)-            {-              const char *eol = matcher->eol(true); // warning: call eol() before bol() and end()-              const char *bol = matcher->bol();--              // check CNF AND/OR/NOT matching, with --files acquire lock before Stats::found_part()-              if (!cnf_matching(bol, eol, acquire))-                continue;-            }--            ++matches;--            // -m: max number of matches reached?-            if (flag_max_count > 0 && matches >= flag_max_count)-              break;-          }-        }-        else-        {-          // -c without -o/-u: count the number of matching lines--          size_t lineno = 0;--          while (matcher->find())-          {-            size_t current_lineno = matcher->lineno();--            if (lineno != current_lineno)+            while (matcher->find())             {               // --range: max line exceeded?-              if (flag_max_line > 0 && current_lineno > flag_max_line)+              if (flag_max_line > 0 && matcher->lineno() > flag_max_line)                 break;                if (matchers != NULL)@@ -8329,18 +8405,56 @@ void Grep::search(const char *pathname)               // -m: max number of matches reached?               if (flag_max_count > 0 && matches >= flag_max_count)                 break;--              lineno = current_lineno;             }           }--          // -c with -v: count non-matching lines-          if (flag_invert_match)+          else           {-            matches = matcher->lineno() - matches;-            if (matches > 0)-              --matches;+            // -c without -o/-u: count the number of matching lines++            size_t lineno = 0;++            while (matcher->find())+            {+              size_t current_lineno = matcher->lineno();++              if (lineno != current_lineno)+              {+                // --range: max line exceeded?+                if (flag_max_line > 0 && current_lineno > flag_max_line)+                  break;++                if (matchers != NULL)+                {+                  const char *eol = matcher->eol(true); // warning: call eol() before bol() and end()+                  const char *bol = matcher->bol();++                  // check CNF AND/OR/NOT matching, with --files acquire lock before Stats::found_part()+                  if (!cnf_matching(bol, eol, acquire))+                    continue;+                }++                ++matches;++                // -m: max number of matches reached?+                if (flag_max_count > 0 && matches >= flag_max_count)+                  break;++                lineno = current_lineno;+              }+            }++            // -c with -v: count non-matching lines+            if (flag_invert_match)+            {+              matches = matcher->lineno() - matches;+              if (matches > 0)+                --matches;+            }           }++          // --match: adjust match count when the last line has no \n line ending+          if (flag_empty && matcher->last() > 0 && *(matcher->eol(true) - 1) != '\n')+            ++matches;         }          // --files: if we are still holding the output and CNF is not satisfyable then no global matches were made@@ -8812,6 +8926,13 @@ void Grep::search(const char *pathname)             {               if (binary)               {+                if (flag_hex_after > 0)+                {+                  size_t right = flag_hex_after * flag_hex_columns - ((restline_last - 1) % flag_hex_columns) - 1;+                  if (right < restline_size)+                    restline_size = right;+                }+                 out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, restline_size);               }               else@@ -8903,6 +9024,16 @@ void Grep::search(const char *pathname)              if (binary)             {+              if (flag_hex_before > 0)+              {+                size_t left = (flag_hex_before - 1) * flag_hex_columns + (first % flag_hex_columns);+                if (begin > bol + left)+                {+                  bol = begin - left;+                  border = left;+                }+              }+               out.dump.hex(Output::Dump::HEX_LINE, first - border, bol, border);               out.dump.hex(Output::Dump::HEX_MATCH, first, begin, size); @@ -9009,6 +9140,33 @@ void Grep::search(const char *pathname)                  if (binary)                 {+                  if (flag_hex_after > 0 && flag_hex_before > 0)+                  {+                    size_t right = flag_hex_after * flag_hex_columns - ((restline_last - 1) % flag_hex_columns) - 1;+                    if (right < first - restline_last)+                    {+                      out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, right);++                      restline_data += right;+                      restline_size -= right;+                      restline_last += right;++                      size_t left = (flag_hex_before - 1) * flag_hex_columns + (first % flag_hex_columns);++                      if (left < first - restline_last)+                      {+                        if (!flag_no_header)+                          out.header(pathname, partname, current_lineno, matcher, first, "+", binary);++                        left = first - restline_last - left;++                        restline_data += left;+                        restline_size -= left;+                        restline_last += left;+                      }+                    }+                  }+                   out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, first - restline_last);                   out.dump.hex(Output::Dump::HEX_MATCH, first, begin, size);                 }@@ -9131,6 +9289,13 @@ void Grep::search(const char *pathname)         {           if (binary)           {+            if (flag_hex_after > 0)+            {+              size_t right = flag_hex_after * flag_hex_columns - ((restline_last - 1) % flag_hex_columns) - 1;+              if (right < restline_size)+                restline_size = right;+            }+             out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, restline_size);           }           else@@ -9714,6 +9879,13 @@ void Grep::search(const char *pathname)             {               if (binary)               {+                if (flag_hex_after > 0)+                {+                  size_t right = flag_hex_after * flag_hex_columns - ((restline_last - 1) % flag_hex_columns) - 1;+                  if (right < restline_size)+                    restline_size = right;+                }+                 out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, restline_size);               }               else@@ -9835,6 +10007,16 @@ void Grep::search(const char *pathname)              if (binary)             {+              if (flag_hex_before > 0)+              {+                size_t left = (flag_hex_before - 1) * flag_hex_columns + (first % flag_hex_columns);+                if (begin > bol + left)+                {+                  bol = begin - left;+                  border = left;+                }+              }+               out.dump.hex(Output::Dump::HEX_LINE, first - border, bol, border);               out.dump.hex(Output::Dump::HEX_MATCH, first, begin, size); @@ -10065,6 +10247,13 @@ void Grep::search(const char *pathname)         {           if (binary)           {+            if (flag_hex_after > 0)+            {+              size_t right = flag_hex_after * flag_hex_columns - ((restline_last - 1) % flag_hex_columns) - 1;+              if (right < restline_size)+                restline_size = right;+            }+             out.dump.hex(Output::Dump::HEX_LINE, restline_last, restline_data, restline_size);           }           else@@ -10675,7 +10864,7 @@ exit_search: }  // read globs from a file and split them into files or dirs to include or exclude-void split_globs(FILE *file, std::vector<std::string>& files, std::vector<std::string>& dirs)+void import_globs(FILE *file, std::vector<std::string>& files, std::vector<std::string>& dirs) {   // read globs from the specified file or files   reflex::BufferedInput input(file);@@ -11364,12 +11553,15 @@ void help(std::ostream& out)             In addition, `--help format' displays an overview of FORMAT fields,\n\             `--help regex' displays an overview of regular expressions and\n\             `--help globs' displays an overview of glob syntax and conventions.\n\-    --hexdump=[1-8][a][b][c][h]\n\+    --hexdump=[1-8][a][bch][A[NUM]][B[NUM]][C[NUM]]\n\             Output matches in 1 to 8 columns of 8 hexadecimal octets.  The\n\             default is 2 columns or 16 octets per line.  Option `a' outputs a\n\             `*' for all hex lines that are identical to the previous hex line,\n\-            `b' removes all space breaks, `c' removes the character column and\n\-            `h' removes hex spacing.  Enables -X if -W or -X is not specified.\n\+            `b' removes all space breaks, `c' removes the character column, `h'\n\+            removes hex spacing, `A' includes up to NUM hex lines after the\n\+            match, `B' includes up to NUM hex lines before the match and `C'\n\+            includes up to NUM hex lines.  When NUM is omitted, the matching\n\+            line is included in the output.  See also options -U, -W and -X.\n\     --hidden, -.\n\             Search " #ifdef OS_WIN@@ -11391,13 +11583,12 @@ void help(std::ostream& out)             is encountered in recursive searches.  The default FILE is\n\             `" DEFAULT_IGNORE_FILE "'.  Matching files and directories located in the\n\             directory of a FILE's location and in directories below are ignored\n\-            by temporarily overriding the --exclude and --exclude-dir globs,\n\-            as if --exclude-from=FILE is locally enforced.  Globbing is the\n\-            same as --exclude-from=FILE and supports gitignore syntax, but\n\-            directories are not automatically excluded from searches (use a\n\-            glob ending with a `/' to identify directories to ignore, same as\n\-            git).  Files and directories explicitly specified as command line\n\-            arguments are never ignored.  This option may be repeated.\n\+            by temporarily extending the --exclude and --exclude-dir globs, as\n\+            if --exclude-from=FILE is locally enforced.  Globbing syntax is the\n\+            same as the --exclude-from=FILE gitignore syntax; directories are\n\+            excluded when the glob ends in a `/', same as git.  Files and\n\+            directories explicitly specified as command line arguments are\n\+            never ignored.  This option may be repeated with additional files.\n\     --include=GLOB\n\             Search only files whose name matches GLOB using wildcard matching,\n\             same as -g GLOB.  GLOB can use **, *, ?, and [...] as wildcards and\n\@@ -11670,7 +11861,9 @@ void help(std::ostream& out)             Use COMMAND to view/edit a file in query mode when pressing CTRL-Y.\n\     -W, --with-hex\n\             Output binary matches in hexadecimal, leaving text matches alone.\n\-            This option is equivalent to the --binary-files=with-hex option.\n\+            This option is equivalent to the --binary-files=with-hex option\n\+            with --hexdump=2C.  To omit the matching line from the hex output,\n\+            combine option --hexdump with option -W.  See also option -U.\n\     -w, --word-regexp\n\             The PATTERN is searched for as a word, such that the matching text\n\             is preceded by a non-word character and is followed by a non-word\n\@@ -11682,7 +11875,9 @@ void help(std::ostream& out)             patterns to narrow or widen the scope of the PATTERN search.\n\     -X, --hex\n\             Output matches in hexadecimal.  This option is equivalent to the\n\-            --binary-files=hex option.  See also option --hexdump.\n\+            --binary-files=hex option with --hexdump=2C.  To omit the matching\n\+            line from the hex output, use option --hexdump instead of -X.  See\n\+            also option -U.\n\     -x, --line-regexp\n\             Select only those matches that exactly match the whole line, as if\n\             the patterns are surrounded by ^ and $.  If a PATTERN is specified,\n\@@ -11700,16 +11895,16 @@ void help(std::ostream& out)     -y, --any-line\n\             Any line is output (passthru).  Non-matching lines are output as\n\             context with a `-' separator.  See also options -A, -B and -C.\n\-    -Z[[+-~]MAX], --fuzzy[=[+-~]MAX]\n\+    -Z[+-~][MAX], --fuzzy=[+-~][MAX]\n\             Fuzzy mode: report approximate pattern matches within MAX errors.\n\-            By default, MAX is 1: one deletion, insertion or substitution is\n\-            allowed.  When `+' and/or `-' precede MAX, only insertions and/or\n\-            deletions are allowed, respectively.  When `~' precedes MAX,\n\-            substitution counts as one error.  For example, -Z+~3 allows up to\n\-            three insertions or substitutions, but no deletions.  The first\n\-            character of an approximate match always matches the begin of a\n\-            pattern.  Option --sort=best orders matching files by best match.\n\-            No whitespace may be given between -Z and its argument.\n\+            The default is -Z1: one deletion, insertion or substitution is\n\+            allowed.  If `+`, `-' and/or `~' is specified, then `+' allows\n\+            insertions, `-' allows deletions and `~' allows substitutions.  For\n\+            example, -Z+~3 allows up to three insertions or substitutions, but\n\+            no deletions.  The first character of an approximate match always\n\+            matches the start of a pattern.  Option --sort=best orders matching\n\+            files by best match.  No whitespace may be given between -Z and its\n\+            argument.\n\     -z, --decompress\n\             Decompress files to search, when compressed.  Archives (.cpio,\n\             .pax, .tar and .zip) and compressed archives (e.g. .taz, .tgz,\n\@@ -11898,59 +12093,59 @@ void help(const char *what)       std::cout << "Extended regular expression syntax overview (excludes some advanced patterns):\n\ \n\- pattern     matches                     pattern     special characters\n\+ pattern     matches                     pattern     removes special meaning   \n\  ----------  --------------------------  ----------  --------------------------\n\- .           any char except newline     \\f          form feed\n\- a           the character a             \\n          newline\n\- ab          the string ab               \\r          carriage return\n\- a|b         a or b                      \\R          any Unicode newline\n\- a*          zero or more a's            \\t          tab\n\- a+          one or more a's             \\v          vertical tab\n\- a?          zero or one a               \\0          NUL\n\- a{3}        3 a's                       \\cZ         control character Z\n\- a{3,}       3 or more a's               \\xHH        hex character code HH\n\- a{3,7}      3 to 7 a's                  \\x{HHHH}    hex character code HHHH\n\- a*?         zero or more a's lazily     \\u{HHHH}    hex character code HHHH\n\- a+?         one or more a's lazily      --------------------------------------\n\- a??         zero or one a lazily\n\- a{3}?       3 a's lazily                pattern     anchors and boundaries\n\- a{3,}?      3 or more a's lazily        ----------  --------------------------\n\- a{3,7}?     3 to 7 a's lazily           ^           begin of line anchor\n\- --------------------------------------  $           end of line anchor\n\-                                         \\b          word boundary (-P)\n\- pattern     character classes           \\B          non-word boundary (-P)\n\- ----------  --------------------------  \\<          start word boundary (-P)\n\- [abc-e]     one character a,b,c,d,e     \\>          end word boundary (-P)\n\- [^abc-e]    one char not a,b,c,d,e,\\n   (?=...)     lookahead (-P)\n\- [[:name:]]  one char in POSIX class:    (?!...)     negative lookahead (-P)\n\-      alnum  a-z,A-Z,0-9                 (?<=...)    lookbehind (-P)\n\-      alpha  a-z,A-Z                     (?<!...)    negative lookbehind (-P)\n\-      ascii  ASCII char \\x00-\\x7f        --------------------------------------\n\-      blank  space or tab\n\-      cntrl  control characters          pattern     grouping\n\-      digit  0-9                         ----------  --------------------------\n\-      graph  visible characters          (...)       capturing group (-P)\n\-      lower  a-z                         (...)       non-capturing group\n\-      print  visible chars and space     (?:...)     non-capturing group\n\-      punct  punctuation characters      (?<X>...)   capturing, named X (-P)\n\-      space  space,\\t,\\n,\\v,\\f,\\r        \\1          matches group 1 (-P)\n\-      upper  A-Z                         \\g{10}      matches group 10 (-P)\n\-       word  a-z,A-Z,0-9,_               \\g{X}       matches group X (-P)\n\-     xdigit  0-9,a-f,A-F                 (?#...)     comments ... are ignored\n\- \\p{class}   one character in class      --------------------------------------\n\- \\P{class}   one char not in class\n\- \\d          a digit                     pattern     removes special meaning\n\- \\D          a non-digit                 ----------  --------------------------\n\- \\h          a space or tab              \\.          escapes . and other chars\n\- \\H          not a space or tab          \\Q...\\E     the literal string ...\n\- \\s          a whitespace except \\n      --------------------------------------\n\- \\S          a non-whitespace\n\- \\w          a word character            (-P): ugrep option -P is required\n\- \\W          a non-word character\n\- -------------------------------------- \n\+ .           any character except \\n     \\.          escapes . to match .\n\+ a           the character a             \\Q...\\E     the literal string ...\n\+ ab          the string ab               --------------------------------------\n\+ a|b         a or b                      \n\+ a*          zero or more a's            pattern     special characters\n\+ a+          one or more a's             ----------  --------------------------\n\+ a?          zero or one a               \\f          form feed\n\+ a{3}        3 a's                       \\n          newline\n\+ a{3,}       3 or more a's               \\r          carriage return\n\+ a{3,7}      3 to 7 a's                  \\R          any Unicode line break\n\+ a*?         zero or more a's lazily     \\t          tab\n\+ a+?         one or more a's lazily      \\v          vertical tab\n\+ a??         zero or one a lazily        \\X          any character and \\n\n\+ a{3}?       3 a's lazily                \\cZ         control character ^Z\n\+ a{3,}?      3 or more a's lazily        \\0          NUL\n\+ a{3,7}?     3 to 7 a's lazily           \\0ddd       octal character code ddd\n\+ --------------------------------------  \\xhh        hex character code hh\n\+                                         \\x{hex}     hex Unicode code point\n\+ pattern     character classes           \\u{hex}     hex Unicode code point\n\+ ----------  --------------------------  --------------------------------------\n\+ [abc-e]     one character a,b,c,d,e     \n\+ [^abc-e]    one char not a,b,c,d,e,\\n   pattern     anchors and boundaries\n\+ [[:name:]]  one char in POSIX class:    ----------  --------------------------\n\+      alnum  a-z,A-Z,0-9                 ^           begin of line anchor\n\+      alpha  a-z,A-Z                     $           end of line anchor\n\+      ascii  ASCII char \\x00-\\x7f        \\b          word boundary (-P)\n\+      blank  space or tab                \\B          non-word boundary (-P)\n\+      cntrl  control characters          \\<          start word boundary (-P)\n\+      digit  0-9                         \\>          end word boundary (-P)\n\+      graph  visible characters          (?=...)     lookahead (-P)\n\+      lower  a-z                         (?!...)     negative lookahead (-P)\n\+      print  visible chars and space     (?<=...)    lookbehind (-P)\n\+      punct  punctuation characters      (?<!...)    negative lookbehind (-P)\n\+      space  space,\\t,\\n,\\v,\\f,\\r        --------------------------------------\n\+      upper  A-Z                         \n\+       word  a-z,A-Z,0-9,_               pattern     grouping\n\+     xdigit  0-9,a-f,A-F                 ----------  --------------------------\n\+ \\p{class}   one character in class      (...)       capturing group (-P)\n\+ \\P{class}   one char not in class       (...)       non-capturing group\n\+ \\d          a digit                     (?:...)     non-capturing group\n\+ \\D          a non-digit                 (?<X>...)   capturing, named X (-P)\n\+ \\h          a space or tab              \\1          matches group 1 (-P)\n\+ \\H          not a space or tab          \\g{10}      matches group 10 (-P)\n\+ \\s          a whitespace except \\n      \\g{X}       matches group name X (-P)\n\+ \\S          a non-whitespace            (?#...)     comments ... are ignored\n\+ \\w          a word character            --------------------------------------\n\+ \\W          a non-word character        \n\+ --------------------------------------      (-P): pattern requires option -P\n\ \n\-Option -U disables full Unicode pattern matching.  Non-POSIX Unicode character\n\-classes \\p{class} are disabled.  ASCII, LATIN1 and binary regex patterns only.\n\+Option -U disables full Unicode pattern matching: non-POSIX Unicode character\n\+classes \\p{class} are disabled, ASCII, LATIN1 and binary regex patterns only.\n\ \n\ Option --bool adds the following operations to regex patterns `a' and `b':\n\ \n\@@ -11971,6 +12166,9 @@ before OR and OR is performed before AND.  Thus, `-x|y z' is `((-x)|y) z'.\n\     {       std::cout << "Glob syntax and conventions:\n\+\n\+Gitignore-style globbing is performed by -g (--glob), --include, --exclude,\n\+--include-dir, --exclude-dir, --include-from, --exclude-from, --ignore-files.\n\ \n\  pattern     matches\n\  ----------  -----------------------------------------------------------\n\@@ -11979,7 +12177,7 @@ before OR and OR is performed before AND.  Thus, `-x|y z' is `((-x)|y) z'.\n\  [abc-e]     one character a,b,c,d,e\n\  [^abc-e]    one character not a,b,c,d,e,/\n\  [!abc-e]    one character not a,b,c,d,e,/\n\- /           when used at the begin of a glob, matches working directory\n\+ /           when used at the start of a glob, matches working directory\n\  **/         zero or more directories\n\  /**         when at the end of a glob, matches everything after the /\n\  \\?          a ? or any other character specified after the backslash\n\

src/ugrep.hpp

@@ -38,7 +38,7 @@ #define UGREP_HPP  // ugrep version-#define UGREP_VERSION "3.7.1"+#define UGREP_VERSION "3.7.2"  // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP

tests/archive.cpio

Binary file changed

tests/archive.gz

Binary file changed

tests/archive.pax

Binary file changed

tests/archive.tZ

Binary file changed

tests/archive.tar

Binary file changed

tests/archive.tar.lz4

Binary file changed

tests/archive.tar.zip

Binary file changed

tests/archive.tbz

Binary file changed

tests/archive.tgz

Binary file changed

tests/archive.tlz

Binary file changed

tests/archive.txz

Binary file changed

tests/archive.tzst

Binary file changed

tests/archive.zip

Binary file changed

tests/archive2.tgz

Binary file changed

tests/archive3.tgz

Binary file changed

tests/emptyline.txt

new file mode 100644@@ -0,0 +1 @@+

tests/gen.sh

@@ -2,7 +2,7 @@  UG="../src/ugrep --color=always --sort" -FILES="Hello.bat Hello.class Hello.java Hello.pdf Hello.sh Hello.txt"+FILES="Hello.bat Hello.class Hello.java Hello.pdf Hello.sh Hello.txt empty.txt emptyline.txt"  if [ ! -x "../src/ugrep" ] ; then   echo "../src/ugrep not found, exiting"@@ -141,9 +141,9 @@ echo "GENERATING TEST ARCHIVES"  rm -f archive.* -ls $FILES empty.txt | cpio -o --quiet > archive.cpio-ls $FILES empty.txt | pax -w -f archive.pax-tar cf archive.tar $FILES empty.txt+ls $FILES | cpio -o --quiet > archive.cpio+ls $FILES | pax -w -f archive.pax+tar cf archive.tar $FILES compress -c archive.tar > archive.tZ gzip  -9 -c archive.tar > archive.tgz bzip2 -9 -c archive.tar > archive.tbz@@ -152,7 +152,7 @@ xz    -9 -c archive.tar > archive.txz lz4   -9 -c archive.tar > archive.tar.lz4 zstd  -9 -c archive.tar > archive.tzst zip   -9 -q archive.tar.zip archive.tar-zip   -9 -q archive.zip $FILES empty.txt+zip   -9 -q archive.zip $FILES  tar cfz archive2.tgz archive.tar $FILES archive.tgz tar cfz archive3.tgz archive.tgz $FILES archive2.tgz

tests/out/Hello_--bool--json.out

@@ -182,5 +182,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_--bool-C2.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_--bool-l.out

@@ -4,3 +4,4 @@ Hello.pdf Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_--bool-o.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--bool-y.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--bool.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--csv-c.out

@@ -4,3 +4,5 @@ "Hello.pdf",134 "Hello.sh",2 "Hello.txt",1+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_--csv-co.out

@@ -4,3 +4,5 @@ "Hello.pdf",134 "Hello.sh",2 "Hello.txt",1+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_--csv-cv.out

@@ -4,3 +4,5 @@ "Hello.pdf",0 "Hello.sh",0 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_--csv-l.out

@@ -4,3 +4,4 @@ "Hello.pdf",true "Hello.sh",true "Hello.txt",true+"emptyline.txt",true

tests/out/Hello_--csv-n.out

@@ -152,3 +152,4 @@ "Hello.sh",1,"#!/bin/sh" "Hello.sh",2,"echo ""Hello World!""" "Hello.txt",1,"Hello"+"emptyline.txt",1,""

tests/out/Hello_--csv-nkb.out

@@ -152,3 +152,4 @@ "Hello.sh",1,1,0,"#!/bin/sh" "Hello.sh",2,1,10,"echo ""Hello World!""" "Hello.txt",1,1,0,"Hello"+"emptyline.txt",1,1,0,""

tests/out/Hello_--csv-o.out

@@ -152,3 +152,4 @@ "Hello.sh","#!/bin/sh" "Hello.sh","echo ""Hello World!""" "Hello.txt","Hello"+"emptyline.txt",""

tests/out/Hello_--csv-on.out

@@ -152,3 +152,4 @@ "Hello.sh",1,"#!/bin/sh" "Hello.sh",2,"echo ""Hello World!""" "Hello.txt",1,"Hello"+"emptyline.txt",1,""

tests/out/Hello_--csv-onkb.out

@@ -152,3 +152,4 @@ "Hello.sh",1,1,0,"#!/bin/sh" "Hello.sh",2,1,10,"echo ""Hello World!""" "Hello.txt",1,1,0,"Hello"+"emptyline.txt",1,1,0,""

tests/out/Hello_--csv-ounkb.out

@@ -152,3 +152,4 @@ "Hello.sh",1,1,0,"#!/bin/sh" "Hello.sh",2,1,10,"echo ""Hello World!""" "Hello.txt",1,1,0,"Hello"+"emptyline.txt",1,1,0,""

tests/out/Hello_--csv-unkb.out

@@ -152,3 +152,4 @@ "Hello.sh",1,1,0,"#!/bin/sh" "Hello.sh",2,1,10,"echo ""Hello World!""" "Hello.txt",1,1,0,"Hello"+"emptyline.txt",1,1,0,""

tests/out/Hello_--csv.out

@@ -152,3 +152,4 @@ "Hello.sh","#!/bin/sh" "Hello.sh","echo ""Hello World!""" "Hello.txt","Hello"+"emptyline.txt",""

tests/out/Hello_--files--bool--json.out

@@ -182,5 +182,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_--files--bool-C2.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--files--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_--files--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_--files--bool-l.out

@@ -4,3 +4,4 @@ Hello.pdf Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_--files--bool-o.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--files--bool-y.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--files--bool.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--format.out

@@ -164,3 +164,6 @@ 6) Hello.txt:   1) 1,1 5-5 +7) emptyline.txt:+  1) 1,1 0-0+

tests/out/Hello_--json-c.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 1 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_--json-co.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 1 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_--json-cv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_--json-l.out

@@ -34,5 +34,11 @@     "matches": [       { "match": true }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": true }+    ]   } ]

tests/out/Hello_--json-n.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_--json-nkb.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "column": 1, "offset": 0, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "column": 1, "offset": 0, "match": "" }+    ]   } ]

tests/out/Hello_--json-o.out

@@ -182,5 +182,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_--json-on.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_--json-onkb.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "column": 1, "offset": 0, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "column": 1, "offset": 0, "match": "" }+    ]   } ]

tests/out/Hello_--json-ounkb.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "column": 1, "offset": 0, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "column": 1, "offset": 0, "match": "" }+    ]   } ]

tests/out/Hello_--json-unkb.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "column": 1, "offset": 0, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "column": 1, "offset": 0, "match": "" }+    ]   } ]

tests/out/Hello_--json.out

@@ -182,5 +182,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_--replace.out

@@ -12,3 +12,4 @@ Hello.sh:(1:#!/bin/sh) Hello.sh:(2:echo "Hello World!") Hello.txt:(1:Hello)+emptyline.txt:(1:)

tests/out/Hello_--tag.out

@@ -12,3 +12,4 @@ Binary file Hello.pdf matches Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_--xml-c.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>1</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_--xml-co.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>1</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_--xml-cv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_--xml-l.out

@@ -17,4 +17,7 @@   <file name="Hello.txt">     <match>true</match>   </file>+  <file name="emptyline.txt">+    <match>true</match>+  </file> </grep>

tests/out/Hello_--xml-n.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_--xml-nkb.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1" column="1" offset="0">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1" column="1" offset="0"></match>+  </file> </grep>

tests/out/Hello_--xml-o.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match>Hello</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_--xml-on.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_--xml-onkb.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1" column="1" offset="0">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1" column="1" offset="0"></match>+  </file> </grep>

tests/out/Hello_--xml-ounkb.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1" column="1" offset="0">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1" column="1" offset="0"></match>+  </file> </grep>

tests/out/Hello_--xml-unkb.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1" column="1" offset="0">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1" column="1" offset="0"></match>+  </file> </grep>

tests/out/Hello_--xml.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match>Hello</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_-C2.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-F.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-Fw.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-Fx.out

@@ -1 +1,2 @@ Hello.java:+emptyline.txt:

tests/out/Hello_-G.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-Gw.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-Gx.out

@@ -1 +1,2 @@ Hello.java:+emptyline.txt:

tests/out/Hello_-I-C2.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-I-c.out

@@ -2,3 +2,5 @@ Hello.java:7 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-I-co.out

@@ -2,3 +2,5 @@ Hello.java:7 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-I-cv.out

@@ -2,3 +2,5 @@ Hello.java:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_-I-l.out

@@ -2,3 +2,4 @@ Hello.java Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_-I-n.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-I-nC2.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-I-nkbT.out

@@ -10,3 +10,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-I-nvy.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_-I-ny.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-I-o.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-I-on.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-I-onkbT.out

@@ -10,3 +10,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-I-ounkbT.out

@@ -10,3 +10,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-I-unkbT.out

@@ -10,3 +10,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-I-vy.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_-I-y.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-I.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-IP.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-IPw.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-IPx.out

@@ -1 +1,2 @@ Hello.java:+emptyline.txt:

tests/out/Hello_-Iw.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-Ix.out

@@ -1 +1,2 @@ Hello.java:+emptyline.txt:

tests/out/Hello_-W-C2.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-W-c.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-W-co.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-W-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_-W-l.out

@@ -4,3 +4,4 @@ Hello.pdf Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_-W-n.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-W-nC2.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-W-nkbT.out

@@ -464,3 +464,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-W-nvy.out

@@ -464,3 +464,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_-W-ny.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-W-o.out

@@ -462,3 +462,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-W-on.out

@@ -462,3 +462,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-W-onkbT.out

@@ -462,3 +462,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-W-ounkbT.out

@@ -462,3 +462,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-W-unkbT.out

@@ -464,3 +464,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-W-vy.out

@@ -464,3 +464,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_-W-y.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-W.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-X-C2.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-c.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-X-co.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-X-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_-X-l.out

@@ -4,3 +4,4 @@ Hello.pdf Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_-X-n.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-nC2.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-nkbT.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:     1:  1:      0:	 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:     1:  1:      0:	+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-nvy.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt-1- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-1-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-ny.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-o.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-on.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-onkbT.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:     1:  1:      0:	 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:     1:  1:      0:	+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-ounkbT.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:     1:  1:      0:	 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:     1:  1:      0:	+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-unkbT.out

@@ -1134,3 +1134,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:     1:  1:      0:	 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:     1:  1:      0:	+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-vy.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X-y.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-X.out

@@ -428,3 +428,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_-c.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-co.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:1+empty.txt:0+emptyline.txt:1

tests/out/Hello_-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_-l.out

@@ -4,3 +4,4 @@ Hello.pdf Hello.sh Hello.txt+emptyline.txt

tests/out/Hello_-n.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-nC2.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-nkbT.out

@@ -12,3 +12,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-nvy.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_-ny.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-o.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_-on.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_-onkbT.out

@@ -12,3 +12,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-ounkbT.out

@@ -12,3 +12,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-unkbT.out

@@ -12,3 +12,4 @@ Hello.sh:     1:  1:      0:	#!/bin/sh Hello.sh:     2:  1:     10:	echo "Hello World!" Hello.txt:     1:  1:      0:	Hello+emptyline.txt:     1:  1:      0:	

tests/out/Hello_-vy.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_-y.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_Hello--csv-c.out

@@ -4,3 +4,5 @@ "Hello.pdf",1 "Hello.sh",1 "Hello.txt",1+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_Hello--csv-co.out

@@ -4,3 +4,5 @@ "Hello.pdf",1 "Hello.sh",1 "Hello.txt",1+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_Hello--csv-cv.out

@@ -4,3 +4,5 @@ "Hello.pdf",133 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_Hello--csv-lv.out

@@ -0,0 +1,2 @@+"empty.txt",false+"emptyline.txt",false

tests/out/Hello_Hello--csv-nv.out

@@ -145,3 +145,4 @@ "Hello.pdf",133,"5536" "Hello.pdf",134,"%%EOF" "Hello.sh",1,"#!/bin/sh"+"emptyline.txt",1,""

tests/out/Hello_Hello--csv-v.out

@@ -145,3 +145,4 @@ "Hello.pdf","5536" "Hello.pdf","%%EOF" "Hello.sh","#!/bin/sh"+"emptyline.txt",""

tests/out/Hello_Hello--json-c.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 1 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_Hello--json-co.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 1 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_Hello--json-cv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_Hello--json-lv.out

@@ -1,2 +1,14 @@ [+  {+    "file": "empty.txt",+    "matches": [+      { "match": false }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": false }+    ]+  } ]

tests/out/Hello_Hello--json-nv.out

@@ -170,5 +170,11 @@     "matches": [       { "line": 1, "match": "#!/bin/sh" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_Hello--json-v.out

@@ -170,5 +170,11 @@     "matches": [       { "match": "#!/bin/sh" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_Hello--xml-c.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>1</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_Hello--xml-co.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>1</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_Hello--xml-cv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_Hello--xml-lv.out

@@ -1,2 +1,8 @@ <grep>+  <file name="empty.txt">+    <match>false</match>+  </file>+  <file name="emptyline.txt">+    <match>false</match>+  </file> </grep>

tests/out/Hello_Hello--xml-nv.out

@@ -156,4 +156,7 @@   <file name="Hello.sh">     <match line="1">#!/bin/sh</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_Hello--xml-v.out

@@ -156,4 +156,7 @@   <file name="Hello.sh">     <match>#!/bin/sh</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_Hello-I-c.out

@@ -2,3 +2,5 @@ Hello.java:2 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-I-co.out

@@ -2,3 +2,5 @@ Hello.java:3 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-I-cv.out

@@ -2,3 +2,5 @@ Hello.java:5 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_Hello-I-lv.out

@@ -0,0 +1,2 @@+empty.txt+emptyline.txt

tests/out/Hello_Hello-I-nv.out

@@ -5,3 +5,4 @@ Hello.java:6:  } Hello.java:7:} Hello.sh:1:#!/bin/sh+emptyline.txt:1:

tests/out/Hello_Hello-I-nvC2.out

@@ -9,3 +9,4 @@ Hello.java:7:} Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!"+emptyline.txt:1:

tests/out/Hello_Hello-I-nvy.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt:1:

tests/out/Hello_Hello-I-ny.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt-1-

tests/out/Hello_Hello-I-v.out

@@ -5,3 +5,4 @@ Hello.java:  } Hello.java:} Hello.sh:#!/bin/sh+emptyline.txt:

tests/out/Hello_Hello-I-vC2.out

@@ -9,3 +9,4 @@ Hello.java:} Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!"+emptyline.txt:

tests/out/Hello_Hello-I-vy.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt:

tests/out/Hello_Hello-I-y.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-W-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-W-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-W-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:133 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_Hello-W-lv.out

@@ -0,0 +1,2 @@+empty.txt+emptyline.txt

tests/out/Hello_Hello-W-nv.out

@@ -442,3 +442,4 @@ Hello.pdf:133:5536 Hello.pdf:134:%%EOF Hello.sh:1:#!/bin/sh+emptyline.txt:1:

tests/out/Hello_Hello-W-nvC2.out

@@ -463,3 +463,4 @@ Hello.pdf:134:%%EOF Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!"+emptyline.txt:1:

tests/out/Hello_Hello-W-nvy.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt:1:

tests/out/Hello_Hello-W-ny.out

@@ -464,3 +464,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt-1-

tests/out/Hello_Hello-W-v.out

@@ -442,3 +442,4 @@ Hello.pdf:5536 Hello.pdf:%%EOF Hello.sh:#!/bin/sh+emptyline.txt:

tests/out/Hello_Hello-W-vC2.out

@@ -463,3 +463,4 @@ Hello.pdf:%%EOF Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!"+emptyline.txt:

tests/out/Hello_Hello-W-vy.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt:

tests/out/Hello_Hello-W-y.out

@@ -464,3 +464,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-World--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-World--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-World--bool-y.out

@@ -11,3 +11,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-Worldgreeting--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-Worldgreeting--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-Worldgreeting--bool-y.out

@@ -11,3 +11,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-X-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-X-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-X-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:133 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_Hello-X-lv.out

@@ -0,0 +1,2 @@+empty.txt+emptyline.txt

tests/out/Hello_Hello-X-nv.out

@@ -682,3 +682,5 @@ 000017e0  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------| Hello.sh:1: 00000000  23 21 2f 62 69 6e 2f 73  68 0a -- -- -- -- -- --  |#!/bin/shJ------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-nvC2.out

@@ -715,3 +715,5 @@ Hello.sh-2- 00000000  -- -- -- -- -- -- -- --  -- -- 65 63 68 6f 20 22  |----------echo "| 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-nvy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt-1- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-ny.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-1-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-v.out

@@ -682,3 +682,5 @@ 000017e0  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------| Hello.sh: 00000000  23 21 2f 62 69 6e 2f 73  68 0a -- -- -- -- -- --  |#!/bin/shJ------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-vC2.out

@@ -715,3 +715,5 @@ Hello.sh- 00000000  -- -- -- -- -- -- -- --  -- -- 65 63 68 6f 20 22  |----------echo "| 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-vy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-X-y.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_Hello-bin--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-bin--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-bin--bool-y.out

@@ -12,3 +12,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-bingreeting--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-bingreeting--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-bingreeting--bool-y.out

@@ -12,3 +12,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-ci.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-cj.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:1 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:133 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_Hello-greetingWorld--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-greetingWorld--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:1 Hello.sh:0 Hello.txt:1+empty.txt:0+emptyline.txt:0

tests/out/Hello_Hello-greetingWorld--bool-y.out

@@ -11,3 +11,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_Hello-lv.out

@@ -0,0 +1,2 @@+empty.txt+emptyline.txt

tests/out/Hello_Hello-nv.out

@@ -7,3 +7,4 @@ Hello.java:7:} Binary file Hello.pdf matches Hello.sh:1:#!/bin/sh+emptyline.txt:1:

tests/out/Hello_Hello-nvC2.out

@@ -11,3 +11,4 @@ Binary file Hello.pdf matches Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!"+emptyline.txt:1:

tests/out/Hello_Hello-nvy.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt:1:

tests/out/Hello_Hello-ny.out

@@ -12,3 +12,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt-1-

tests/out/Hello_Hello-v--format.out

@@ -155,3 +155,6 @@ 5) Hello.sh:   1) 1,1 9-9 +6) emptyline.txt:+  1) 1,1 0-0+

tests/out/Hello_Hello-v.out

@@ -7,3 +7,4 @@ Hello.java:} Binary file Hello.pdf matches Hello.sh:#!/bin/sh+emptyline.txt:

tests/out/Hello_Hello-vC2.out

@@ -11,3 +11,4 @@ Binary file Hello.pdf matches Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!"+emptyline.txt:

tests/out/Hello_Hello-vy.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt:

tests/out/Hello_Hello-y.out

@@ -12,3 +12,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt-

tests/out/Hello_HelloWorld--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_HelloWorld--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:2 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_HelloWorld--bool-y.out

@@ -11,3 +11,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_SnS--csv-c.out

@@ -4,3 +4,5 @@ "Hello.pdf",112 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_SnS--csv-co.out

@@ -4,3 +4,5 @@ "Hello.pdf",112 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_SnS--csv-cv.out

@@ -4,3 +4,5 @@ "Hello.pdf",22 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_SnS--csv-lv.out

@@ -1 +1,3 @@ "Hello.txt",false+"empty.txt",false+"emptyline.txt",false

tests/out/Hello_SnS--csv-nv.out

@@ -22,3 +22,4 @@ "Hello.pdf",127,"0000005353 00000 n " "Hello.pdf",128,"0000005372 00000 n " "Hello.txt",1,"Hello"+"emptyline.txt",1,""

tests/out/Hello_SnS--csv-v.out

@@ -22,3 +22,4 @@ "Hello.pdf","0000005353 00000 n " "Hello.pdf","0000005372 00000 n " "Hello.txt","Hello"+"emptyline.txt",""

tests/out/Hello_SnS--json-c.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_SnS--json-co.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_SnS--json-cv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_SnS--json-lv.out

@@ -4,5 +4,17 @@     "matches": [       { "match": false }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": false }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": false }+    ]   } ]

tests/out/Hello_SnS--json-nv.out

@@ -37,5 +37,11 @@     "matches": [       { "line": 1, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_SnS--json-v.out

@@ -37,5 +37,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_SnS--xml-c.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_SnS--xml-co.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_SnS--xml-cv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_SnS--xml-lv.out

@@ -2,4 +2,10 @@   <file name="Hello.txt">     <match>false</match>   </file>+  <file name="empty.txt">+    <match>false</match>+  </file>+  <file name="emptyline.txt">+    <match>false</match>+  </file> </grep>

tests/out/Hello_SnS--xml-nv.out

@@ -29,4 +29,7 @@   <file name="Hello.txt">     <match line="1">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_SnS--xml-v.out

@@ -29,4 +29,7 @@   <file name="Hello.txt">     <match>Hello</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_SnS-I-c.out

@@ -2,3 +2,5 @@ Hello.java:2 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-I-co.out

@@ -2,3 +2,5 @@ Hello.java:2 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-I-cv.out

@@ -2,3 +2,5 @@ Hello.java:5 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_SnS-I-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_SnS-I-nv.out

@@ -2,3 +2,4 @@ Hello.java:2: Hello.java:5:  { System.out.println("Hello World!"); Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-I-nvC2.out

@@ -6,3 +6,4 @@ Hello.java-6-  } Hello.java-7-} Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-I-nvy.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-I-ny.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_SnS-I-v.out

@@ -2,3 +2,4 @@ Hello.java: Hello.java:  { System.out.println("Hello World!"); Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-I-vC2.out

@@ -6,3 +6,4 @@ Hello.java-  } Hello.java-} Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-I-vy.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-I-y.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_SnS-W-c.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-W-co.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-W-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:22 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_SnS-W-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_SnS-W-nv.out

@@ -22,3 +22,4 @@ Hello.pdf:127:0000005353 00000 n  Hello.pdf:128:0000005372 00000 n  Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-W-nvC2.out

@@ -30,3 +30,4 @@ Hello.pdf-129-trailer Hello.pdf-130-<< /Size 21 /Root 11 0 R /Info 1 0 R /ID [ <8db88d3335070bd9583341583cf769a3> Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-W-nvy.out

@@ -402,3 +402,4 @@ Hello.sh-1-#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-W-ny.out

@@ -402,3 +402,4 @@ Hello.sh:1:#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_SnS-W-v.out

@@ -22,3 +22,4 @@ Hello.pdf:0000005353 00000 n  Hello.pdf:0000005372 00000 n  Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-W-vC2.out

@@ -30,3 +30,4 @@ Hello.pdf-trailer Hello.pdf-<< /Size 21 /Root 11 0 R /Info 1 0 R /ID [ <8db88d3335070bd9583341583cf769a3> Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-W-vy.out

@@ -402,3 +402,4 @@ Hello.sh-#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-W-y.out

@@ -402,3 +402,4 @@ Hello.sh:#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_SnS-X-c.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-X-co.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-X-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:22 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_SnS-X-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_SnS-X-nv.out

@@ -74,3 +74,5 @@ 00001740  35 33 37 32 20 30 30 30  30 30 20 6e 20 0a -- --  |5372 00000 n J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-nvC2.out

@@ -97,3 +97,5 @@ 000017a0  61 33 3e 0a -- -- -- --  -- -- -- -- -- -- -- --  |a3>J------------| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-nvy.out

@@ -478,3 +478,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-ny.out

@@ -478,3 +478,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt-1- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-1-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-v.out

@@ -74,3 +74,5 @@ 00001740  35 33 37 32 20 30 30 30  30 30 20 6e 20 0a -- --  |5372 00000 n J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-vC2.out

@@ -97,3 +97,5 @@ 000017a0  61 33 3e 0a -- -- -- --  -- -- -- -- -- -- -- --  |a3>J------------| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-vy.out

@@ -478,3 +478,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-X-y.out

@@ -478,3 +478,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_SnS-c.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-co.out

@@ -4,3 +4,5 @@ Hello.pdf:112 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_SnS-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:22 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_SnS-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_SnS-nv.out

@@ -3,3 +3,4 @@ Hello.java:5:  { System.out.println("Hello World!"); Binary file Hello.pdf matches Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-nvC2.out

@@ -7,3 +7,4 @@ Hello.java-7-} Binary file Hello.pdf matches Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-nvy.out

@@ -11,3 +11,4 @@ Hello.sh-1-#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_SnS-ny.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh|2|echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_SnS-v--format.out

@@ -28,3 +28,6 @@ 3) Hello.txt:   1) 1,1 5-5 +4) emptyline.txt:+  1) 1,1 0-0+

tests/out/Hello_SnS-v.out

@@ -3,3 +3,4 @@ Hello.java:  { System.out.println("Hello World!"); Binary file Hello.pdf matches Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-vC2.out

@@ -7,3 +7,4 @@ Hello.java-} Binary file Hello.pdf matches Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-vy.out

@@ -11,3 +11,4 @@ Hello.sh-#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_SnS-y.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh|echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_aHellogreeting--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_aHellogreeting--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_aHellogreeting--bool-y.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_bin-Hello--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_bin-Hello--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_bin-Hello--bool-y.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_bin-greeting--bool-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_bin-greeting--bool-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_bin-greeting--bool-y.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_nomatch--csv-c.out

@@ -4,3 +4,5 @@ "Hello.pdf",0 "Hello.sh",0 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_nomatch--csv-co.out

@@ -4,3 +4,5 @@ "Hello.pdf",0 "Hello.sh",0 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_nomatch--csv-cv.out

@@ -4,3 +4,5 @@ "Hello.pdf",134 "Hello.sh",2 "Hello.txt",0+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_nomatch--csv-lv.out

@@ -4,3 +4,5 @@ "Hello.pdf",false "Hello.sh",false "Hello.txt",false+"empty.txt",false+"emptyline.txt",false

tests/out/Hello_nomatch--csv-nv.out

@@ -152,3 +152,4 @@ "Hello.sh",1,"#!/bin/sh" "Hello.sh",2,"echo ""Hello World!""" "Hello.txt",1,"Hello"+"emptyline.txt",1,""

tests/out/Hello_nomatch--csv-v.out

@@ -152,3 +152,4 @@ "Hello.sh","#!/bin/sh" "Hello.sh","echo ""Hello World!""" "Hello.txt","Hello"+"emptyline.txt",""

tests/out/Hello_nomatch--json-c.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_nomatch--json-co.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_nomatch--json-cv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_nomatch--json-lv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": false }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": false }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": false }+    ]   } ]

tests/out/Hello_nomatch--json-nv.out

@@ -182,5 +182,11 @@     "matches": [       { "line": 1, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_nomatch--json-v.out

@@ -182,5 +182,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_nomatch--xml-c.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_nomatch--xml-co.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_nomatch--xml-cv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_nomatch--xml-lv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>false</match>   </file>+  <file name="empty.txt">+    <match>false</match>+  </file>+  <file name="emptyline.txt">+    <match>false</match>+  </file> </grep>

tests/out/Hello_nomatch--xml-nv.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match line="1">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_nomatch--xml-v.out

@@ -165,4 +165,7 @@   <file name="Hello.txt">     <match>Hello</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_nomatch-I-c.out

@@ -2,3 +2,5 @@ Hello.java:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-I-co.out

@@ -2,3 +2,5 @@ Hello.java:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-I-cv.out

@@ -2,3 +2,5 @@ Hello.java:7 Hello.sh:2 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_nomatch-I-lv.out

@@ -2,3 +2,5 @@ Hello.java Hello.sh Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_nomatch-I-nv.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-I-nvC2.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-I-nvy.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-I-ny.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_nomatch-I-v.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-I-vC2.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-I-vy.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-I-y.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_nomatch-W-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-W-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-W-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_nomatch-W-lv.out

@@ -4,3 +4,5 @@ Hello.pdf Hello.sh Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_nomatch-W-nv.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-W-nvC2.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-W-nvy.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-W-ny.out

@@ -464,3 +464,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_nomatch-W-v.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-W-vC2.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-W-vy.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-W-y.out

@@ -464,3 +464,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_nomatch-X-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-X-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-X-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_nomatch-X-lv.out

@@ -4,3 +4,5 @@ Hello.pdf Hello.sh Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_nomatch-X-nv.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-nvC2.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-nvy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-ny.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt-1- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-1-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-v.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-vC2.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-vy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-X-y.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_nomatch-c.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-co.out

@@ -4,3 +4,5 @@ Hello.pdf:0 Hello.sh:0 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_nomatch-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:134 Hello.sh:2 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_nomatch-lv.out

@@ -4,3 +4,5 @@ Hello.pdf Hello.sh Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_nomatch-nv.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-nvC2.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-nvy.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_nomatch-ny.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_nomatch-v--format.out

@@ -164,3 +164,6 @@ 6) Hello.txt:   1) 1,1 5-5 +7) emptyline.txt:+  1) 1,1 0-0+

tests/out/Hello_nomatch-v.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-vC2.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-vy.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_nomatch-y.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_wsS--csv-c.out

@@ -4,3 +4,5 @@ "Hello.pdf",73 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_wsS--csv-co.out

@@ -4,3 +4,5 @@ "Hello.pdf",165 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",0

tests/out/Hello_wsS--csv-cv.out

@@ -4,3 +4,5 @@ "Hello.pdf",61 "Hello.sh",1 "Hello.txt",0+"empty.txt",0+"emptyline.txt",1

tests/out/Hello_wsS--csv-lv.out

@@ -1 +1,3 @@ "Hello.txt",false+"empty.txt",false+"emptyline.txt",false

tests/out/Hello_wsS--csv-nv.out

@@ -72,3 +72,4 @@ "Hello.pdf",134,"%%EOF" "Hello.sh",1,"#!/bin/sh" "Hello.txt",1,"Hello"+"emptyline.txt",1,""

tests/out/Hello_wsS--csv-v.out

@@ -72,3 +72,4 @@ "Hello.pdf","%%EOF" "Hello.sh","#!/bin/sh" "Hello.txt","Hello"+"emptyline.txt",""

tests/out/Hello_wsS--json-c.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_wsS--json-co.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 0 }+    ]   } ]

tests/out/Hello_wsS--json-cv.out

@@ -34,5 +34,17 @@     "matches": [       { "match": 0 }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": 0 }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": 1 }+    ]   } ]

tests/out/Hello_wsS--json-lv.out

@@ -4,5 +4,17 @@     "matches": [       { "match": false }     ]+  },+  {+    "file": "empty.txt",+    "matches": [+      { "match": false }+    ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": false }+    ]   } ]

tests/out/Hello_wsS--json-nv.out

@@ -102,5 +102,11 @@     "matches": [       { "line": 1, "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "line": 1, "match": "" }+    ]   } ]

tests/out/Hello_wsS--json-v.out

@@ -102,5 +102,11 @@     "matches": [       { "match": "Hello" }     ]+  },+  {+    "file": "emptyline.txt",+    "matches": [+      { "match": "" }+    ]   } ]

tests/out/Hello_wsS--xml-c.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_wsS--xml-co.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>0</match>+  </file> </grep>

tests/out/Hello_wsS--xml-cv.out

@@ -17,4 +17,10 @@   <file name="Hello.txt">     <match>0</match>   </file>+  <file name="empty.txt">+    <match>0</match>+  </file>+  <file name="emptyline.txt">+    <match>1</match>+  </file> </grep>

tests/out/Hello_wsS--xml-lv.out

@@ -2,4 +2,10 @@   <file name="Hello.txt">     <match>false</match>   </file>+  <file name="empty.txt">+    <match>false</match>+  </file>+  <file name="emptyline.txt">+    <match>false</match>+  </file> </grep>

tests/out/Hello_wsS--xml-nv.out

@@ -85,4 +85,7 @@   <file name="Hello.txt">     <match line="1">Hello</match>   </file>+  <file name="emptyline.txt">+    <match line="1"></match>+  </file> </grep>

tests/out/Hello_wsS--xml-v.out

@@ -85,4 +85,7 @@   <file name="Hello.txt">     <match>Hello</match>   </file>+  <file name="emptyline.txt">+    <match></match>+  </file> </grep>

tests/out/Hello_wsS-I-c.out

@@ -2,3 +2,5 @@ Hello.java:4 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-I-co.out

@@ -2,3 +2,5 @@ Hello.java:8 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-I-cv.out

@@ -2,3 +2,5 @@ Hello.java:3 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_wsS-I-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_wsS-I-nv.out

@@ -4,3 +4,4 @@ Hello.java:7:} Hello.sh:1:#!/bin/sh Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-I-nvC2.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-I-nvy.out

@@ -10,3 +10,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-I-ny.out

@@ -10,3 +10,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_wsS-I-v.out

@@ -4,3 +4,4 @@ Hello.java:} Hello.sh:#!/bin/sh Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-I-vC2.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-I-vy.out

@@ -10,3 +10,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-I-y.out

@@ -10,3 +10,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_wsS-W-c.out

@@ -4,3 +4,5 @@ Hello.pdf:73 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-W-co.out

@@ -4,3 +4,5 @@ Hello.pdf:165 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-W-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:61 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_wsS-W-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_wsS-W-nv.out

@@ -165,3 +165,4 @@ Hello.pdf:134:%%EOF Hello.sh:1:#!/bin/sh Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-W-nvC2.out

@@ -447,3 +447,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-W-nvy.out

@@ -464,3 +464,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-W-ny.out

@@ -464,3 +464,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_wsS-W-v.out

@@ -165,3 +165,4 @@ Hello.pdf:%%EOF Hello.sh:#!/bin/sh Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-W-vC2.out

@@ -447,3 +447,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-W-vy.out

@@ -464,3 +464,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-W-y.out

@@ -464,3 +464,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/Hello_wsS-X-c.out

@@ -4,3 +4,5 @@ Hello.pdf:73 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-X-co.out

@@ -4,3 +4,5 @@ Hello.pdf:165 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-X-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:61 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_wsS-X-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_wsS-X-nv.out

@@ -231,3 +231,5 @@ 00000000  23 21 2f 62 69 6e 2f 73  68 0a -- -- -- -- -- --  |#!/bin/shJ------| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-nvC2.out

@@ -654,3 +654,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-nvy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt:1: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:1:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-ny.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt-1- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-1-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-v.out

@@ -231,3 +231,5 @@ 00000000  23 21 2f 62 69 6e 2f 73  68 0a -- -- -- -- -- --  |#!/bin/shJ------| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-vC2.out

@@ -654,3 +654,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-vy.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt: 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt:+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-X-y.out

@@ -717,3 +717,5 @@ 00000010  48 65 6c 6c 6f 20 57 6f  72 6c 64 21 22 0a -- --  |Hello World!"J--| Hello.txt- 00000000  48 65 6c 6c 6f -- -- --  -- -- -- -- -- -- -- --  |Hello-----------|+emptyline.txt-+00000000  0a -- -- -- -- -- -- --  -- -- -- -- -- -- -- --  |J---------------|

tests/out/Hello_wsS-c.out

@@ -4,3 +4,5 @@ Hello.pdf:73 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-co.out

@@ -4,3 +4,5 @@ Hello.pdf:165 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:0

tests/out/Hello_wsS-cv.out

@@ -4,3 +4,5 @@ Hello.pdf:61 Hello.sh:1 Hello.txt:0+empty.txt:0+emptyline.txt:1

tests/out/Hello_wsS-lv.out

@@ -1 +1,3 @@ Hello.txt+empty.txt+emptyline.txt

tests/out/Hello_wsS-nv.out

@@ -6,3 +6,4 @@ Binary file Hello.pdf matches Hello.sh:1:#!/bin/sh Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-nvC2.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-nvy.out

@@ -12,3 +12,4 @@ Hello.sh:1:#!/bin/sh Hello.sh-2-echo "Hello World!" Hello.txt:1:Hello+emptyline.txt:1:

tests/out/Hello_wsS-ny.out

@@ -12,3 +12,4 @@ Hello.sh-1-#!/bin/sh Hello.sh:2:echo "Hello World!" Hello.txt-1-Hello+emptyline.txt-1-

tests/out/Hello_wsS-v--format.out

@@ -84,3 +84,6 @@ 6) Hello.txt:   1) 1,1 5-5 +7) emptyline.txt:+  1) 1,1 0-0+

tests/out/Hello_wsS-v.out

@@ -6,3 +6,4 @@ Binary file Hello.pdf matches Hello.sh:#!/bin/sh Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-vC2.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-vy.out

@@ -12,3 +12,4 @@ Hello.sh:#!/bin/sh Hello.sh-echo "Hello World!" Hello.txt:Hello+emptyline.txt:

tests/out/Hello_wsS-y.out

@@ -12,3 +12,4 @@ Hello.sh-#!/bin/sh Hello.sh:echo "Hello World!" Hello.txt-Hello+emptyline.txt-

tests/out/archive.cpio.out

@@ -5,3 +5,4 @@ archive.cpio{Hello.sh}:1 archive.cpio{Hello.txt}:1 archive.cpio{empty.txt}:0+archive.cpio{emptyline.txt}:0

tests/out/archive.pax.out

@@ -5,3 +5,4 @@ archive.pax{Hello.sh}:1 archive.pax{Hello.txt}:1 archive.pax{empty.txt}:0+archive.pax{emptyline.txt}:0

tests/out/archive.tZ.out

@@ -5,3 +5,4 @@ archive.tZ{Hello.sh}:1 archive.tZ{Hello.txt}:1 archive.tZ{empty.txt}:0+archive.tZ{emptyline.txt}:0

tests/out/archive.tar.lz4.out

@@ -5,3 +5,4 @@ archive.tar.lz4{Hello.sh}:1 archive.tar.lz4{Hello.txt}:1 archive.tar.lz4{empty.txt}:0+archive.tar.lz4{emptyline.txt}:0

tests/out/archive.tar.out

@@ -5,3 +5,4 @@ archive.tar{Hello.sh}:1 archive.tar{Hello.txt}:1 archive.tar{empty.txt}:0+archive.tar{emptyline.txt}:0

tests/out/archive.tar.zip.out

@@ -5,3 +5,4 @@ archive.tar.zip{archive.tar:Hello.sh}:1 archive.tar.zip{archive.tar:Hello.txt}:1 archive.tar.zip{archive.tar:empty.txt}:0+archive.tar.zip{archive.tar:emptyline.txt}:0

tests/out/archive.tbz.out

@@ -5,3 +5,4 @@ archive.tbz{Hello.sh}:1 archive.tbz{Hello.txt}:1 archive.tbz{empty.txt}:0+archive.tbz{emptyline.txt}:0

tests/out/archive.tgz.out

@@ -5,3 +5,4 @@ archive.tgz{Hello.sh}:1 archive.tgz{Hello.txt}:1 archive.tgz{empty.txt}:0+archive.tgz{emptyline.txt}:0

tests/out/archive.tlz.out

@@ -5,3 +5,4 @@ archive.tlz{Hello.sh}:1 archive.tlz{Hello.txt}:1 archive.tlz{empty.txt}:0+archive.tlz{emptyline.txt}:0

tests/out/archive.txz.out

@@ -5,3 +5,4 @@ archive.txz{Hello.sh}:1 archive.txz{Hello.txt}:1 archive.txz{empty.txt}:0+archive.txz{emptyline.txt}:0

tests/out/archive.tzst.out

@@ -5,3 +5,4 @@ archive.tzst{Hello.sh}:1 archive.tzst{Hello.txt}:1 archive.tzst{empty.txt}:0+archive.tzst{emptyline.txt}:0

tests/out/archive.zip.out

@@ -5,3 +5,4 @@ archive.zip{Hello.sh}:1 archive.zip{Hello.txt}:1 archive.zip{empty.txt}:0+archive.zip{emptyline.txt}:0

tests/out/archive2.tgz.out

@@ -5,12 +5,15 @@ archive2.tgz{archive.tar:Hello.sh}:1 archive2.tgz{archive.tar:Hello.txt}:1 archive2.tgz{archive.tar:empty.txt}:0+archive2.tgz{archive.tar:emptyline.txt}:0 archive2.tgz{Hello.bat}:1 archive2.tgz{Hello.class}:1 archive2.tgz{Hello.java}:2 archive2.tgz{Hello.pdf}:1 archive2.tgz{Hello.sh}:1 archive2.tgz{Hello.txt}:1+archive2.tgz{empty.txt}:0+archive2.tgz{emptyline.txt}:0 archive2.tgz{archive.tgz:Hello.bat}:1 archive2.tgz{archive.tgz:Hello.class}:1 archive2.tgz{archive.tgz:Hello.java}:2@@ -18,3 +21,4 @@ archive2.tgz{archive.tgz:Hello.sh}:1 archive2.tgz{archive.tgz:Hello.txt}:1 archive2.tgz{archive.tgz:empty.txt}:0+archive2.tgz{archive.tgz:emptyline.txt}:0

tests/out/archive3.tgz.out

@@ -5,12 +5,15 @@ archive3.tgz{archive.tgz:Hello.sh}:1 archive3.tgz{archive.tgz:Hello.txt}:1 archive3.tgz{archive.tgz:empty.txt}:0+archive3.tgz{archive.tgz:emptyline.txt}:0 archive3.tgz{Hello.bat}:1 archive3.tgz{Hello.class}:1 archive3.tgz{Hello.java}:2 archive3.tgz{Hello.pdf}:1 archive3.tgz{Hello.sh}:1 archive3.tgz{Hello.txt}:1+archive3.tgz{empty.txt}:0+archive3.tgz{emptyline.txt}:0 archive3.tgz{archive2.tgz:archive.tar:Hello.bat}:1 archive3.tgz{archive2.tgz:archive.tar:Hello.class}:1 archive3.tgz{archive2.tgz:archive.tar:Hello.java}:2@@ -18,12 +21,15 @@ archive3.tgz{archive2.tgz:archive.tar:Hello.sh}:1 archive3.tgz{archive2.tgz:archive.tar:Hello.txt}:1 archive3.tgz{archive2.tgz:archive.tar:empty.txt}:0+archive3.tgz{archive2.tgz:archive.tar:emptyline.txt}:0 archive3.tgz{archive2.tgz:Hello.bat}:1 archive3.tgz{archive2.tgz:Hello.class}:1 archive3.tgz{archive2.tgz:Hello.java}:2 archive3.tgz{archive2.tgz:Hello.pdf}:1 archive3.tgz{archive2.tgz:Hello.sh}:1 archive3.tgz{archive2.tgz:Hello.txt}:1+archive3.tgz{archive2.tgz:empty.txt}:0+archive3.tgz{archive2.tgz:emptyline.txt}:0 archive3.tgz{archive2.tgz:archive.tgz:Hello.bat}:1 archive3.tgz{archive2.tgz:archive.tgz:Hello.class}:1 archive3.tgz{archive2.tgz:archive.tgz:Hello.java}:2@@ -31,3 +37,4 @@ archive3.tgz{archive2.tgz:archive.tgz:Hello.sh}:1 archive3.tgz{archive2.tgz:archive.tgz:Hello.txt}:1 archive3.tgz{archive2.tgz:archive.tgz:empty.txt}:0+archive3.tgz{archive2.tgz:archive.tgz:emptyline.txt}:0

tests/verify.sh

@@ -5,7 +5,7 @@ CONFIGH=${CONFIGH_ABS_PATH:-../config.h}  UG="$UGREP --color=always --sort $@" -FILES="Hello.bat Hello.class Hello.java Hello.pdf Hello.sh Hello.txt"+FILES="Hello.bat Hello.class Hello.java Hello.pdf Hello.sh Hello.txt empty.txt emptyline.txt"  if test ! -x "$UGREP" ; then   echo "$UGREP not found, exiting"