@ 260915.5

260429.2 · 5f6f5bd4f77df74faf01076f7d2407a603464868

released 7.8

reading declarations

bin/win32/ug.exe

Binary file changed

bin/win32/ugrep-indexer.exe

Binary file changed

bin/win32/ugrep.exe

Binary file changed

bin/win64/ug.exe

Binary file changed

bin/win64/ugrep-indexer.exe

Binary file changed

bin/win64/ugrep.exe

Binary file changed

completions/bash/ug

@@ -332,7 +332,7 @@ cat <<'END' -u, --ungroup Do not group multiple pattern matches on the same matched line. -V, --version Display version with linked libraries and exit. -v, --invert-match Selected lines are those not matching any of the specified patterns.---view[=COMMAND] Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y.+--view[=[+]COMMAND] Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated. -W, --with-hex Output binary matches in hexadecimal, leaving text matches alone. -w, --word-regexp The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character. --width[=NUM] Truncate the output to NUM visible characters per line.

completions/fish/ug+.fish

@@ -110,7 +110,7 @@ complete -c ug+ -s U -l ascii -l binary -d 'Disables Unicode matching for ASCII complete -c ug+ -s u -l ungroup -d 'Do not group multiple pattern matches on the same matched line' complete -c ug+ -s V -l version -d 'Display version with linked libraries and exit' complete -c ug+ -s v -l invert-match -d 'Selected lines are those not matching any of the specified patterns'-complete -c ug+ -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y'+complete -c ug+ -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated' complete -c ug+ -s W -l with-hex -d 'Output binary matches in hexadecimal, leaving text matches alone' complete -c ug+ -s w -l word-regexp -d 'The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character' complete -c ug+ -l width -d 'Truncate the output to NUM visible characters per line'

completions/fish/ug.fish

@@ -110,7 +110,7 @@ complete -c ug -s U -l ascii -l binary -d 'Disables Unicode matching for ASCII a complete -c ug -s u -l ungroup -d 'Do not group multiple pattern matches on the same matched line' complete -c ug -s V -l version -d 'Display version with linked libraries and exit' complete -c ug -s v -l invert-match -d 'Selected lines are those not matching any of the specified patterns'-complete -c ug -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y'+complete -c ug -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated' complete -c ug -s W -l with-hex -d 'Output binary matches in hexadecimal, leaving text matches alone' complete -c ug -s w -l word-regexp -d 'The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character' complete -c ug -l width -d 'Truncate the output to NUM visible characters per line'

completions/fish/ugrep+.fish

@@ -110,7 +110,7 @@ complete -c ugrep+ -s U -l ascii -l binary -d 'Disables Unicode matching for ASC complete -c ugrep+ -s u -l ungroup -d 'Do not group multiple pattern matches on the same matched line' complete -c ugrep+ -s V -l version -d 'Display version with linked libraries and exit' complete -c ugrep+ -s v -l invert-match -d 'Selected lines are those not matching any of the specified patterns'-complete -c ugrep+ -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y'+complete -c ugrep+ -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated' complete -c ugrep+ -s W -l with-hex -d 'Output binary matches in hexadecimal, leaving text matches alone' complete -c ugrep+ -s w -l word-regexp -d 'The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character' complete -c ugrep+ -l width -d 'Truncate the output to NUM visible characters per line'

completions/fish/ugrep.fish

@@ -110,7 +110,7 @@ complete -c ugrep -s U -l ascii -l binary -d 'Disables Unicode matching for ASCI complete -c ugrep -s u -l ungroup -d 'Do not group multiple pattern matches on the same matched line' complete -c ugrep -s V -l version -d 'Display version with linked libraries and exit' complete -c ugrep -s v -l invert-match -d 'Selected lines are those not matching any of the specified patterns'-complete -c ugrep -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y'+complete -c ugrep -l view -d 'Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated' complete -c ugrep -s W -l with-hex -d 'Output binary matches in hexadecimal, leaving text matches alone' complete -c ugrep -s w -l word-regexp -d 'The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character' complete -c ugrep -l width -d 'Truncate the output to NUM visible characters per line'

completions/zsh/_ug

@@ -117,7 +117,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]' {-v,--invert-match}'[Selected lines are those not matching any of the specified patterns]'---view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y]'+--view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated]' {-W,--with-hex}'[Output binary matches in hexadecimal, leaving text matches alone]' {-w,--word-regexp}'[The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character]' --width'[Truncate the output to NUM visible characters per line]'

completions/zsh/_ug+

@@ -117,7 +117,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]' {-v,--invert-match}'[Selected lines are those not matching any of the specified patterns]'---view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y]'+--view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated]' {-W,--with-hex}'[Output binary matches in hexadecimal, leaving text matches alone]' {-w,--word-regexp}'[The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character]' --width'[Truncate the output to NUM visible characters per line]'

completions/zsh/_ugrep

@@ -117,7 +117,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]' {-v,--invert-match}'[Selected lines are those not matching any of the specified patterns]'---view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y]'+--view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated]' {-W,--with-hex}'[Output binary matches in hexadecimal, leaving text matches alone]' {-w,--word-regexp}'[The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character]' --width'[Truncate the output to NUM visible characters per line]'

completions/zsh/_ugrep+

@@ -117,7 +117,7 @@ $matchers{-P,--perl-regexp}'[Interpret PATTERN as a Perl regular expression usin {-u,--ungroup}'[Do not group multiple pattern matches on the same matched line]' {-V,--version}'[Display version with linked libraries and exit]' {-v,--invert-match}'[Selected lines are those not matching any of the specified patterns]'---view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y]'+--view'[Use COMMAND to view/edit a file in -Q query TUI by pressing CTRL-Y, +COMMAND waits for a key press after COMMAND terminated]' {-W,--with-hex}'[Output binary matches in hexadecimal, leaving text matches alone]' {-w,--word-regexp}'[The PATTERN is searched for as a word, such that the matching text is preceded by a non-word character and is followed by a non-word character]' --width'[Truncate the output to NUM visible characters per line]'

configure

@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles.-# Generated by GNU Autoconf 2.72 for ugrep 7.7.0.+# Generated by GNU Autoconf 2.72 for ugrep 7.8.0. # # Report bugs to <https://github.com/Genivia/ugrep/issues>. #@@ -606,8 +606,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ugrep' PACKAGE_TARNAME='ugrep'-PACKAGE_VERSION='7.7.0'-PACKAGE_STRING='ugrep 7.7.0'+PACKAGE_VERSION='7.8.0'+PACKAGE_STRING='ugrep 7.8.0' PACKAGE_BUGREPORT='https://github.com/Genivia/ugrep/issues' PACKAGE_URL='https://ugrep.com' @@ -1383,7 +1383,7 @@ if test "$ac_init_help" = "long"; then   # Omit some internal or obsolete options to make the list less imposing.   # This message is too long to be a string in the A/UX 3.1 sh.   cat <<_ACEOF-'configure' configures ugrep 7.7.0 to adapt to many kinds of systems.+'configure' configures ugrep 7.8.0 to adapt to many kinds of systems.  Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1454,7 +1454,7 @@ fi  if test -n "$ac_init_help"; then   case $ac_init_help in-     short | recursive ) echo "Configuration of ugrep 7.7.0:";;+     short | recursive ) echo "Configuration of ugrep 7.8.0:";;    esac   cat <<\_ACEOF @@ -1632,7 +1632,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then   cat <<\_ACEOF-ugrep configure 7.7.0+ugrep configure 7.8.0 generated by GNU Autoconf 2.72  Copyright (C) 2023 Free Software Foundation, Inc.@@ -2186,7 +2186,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by ugrep $as_me 7.7.0, which was+It was created by ugrep $as_me 7.8.0, which was generated by GNU Autoconf 2.72.  Invocation command line was    $ $0$ac_configure_args_raw@@ -3696,7 +3696,7 @@ fi  # Define the identity of the package.  PACKAGE='ugrep'- VERSION='7.7.0'+ VERSION='7.8.0'   printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h@@ -11875,7 +11875,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log="-This file was extended by ugrep $as_me 7.7.0, which was+This file was extended by ugrep $as_me 7.8.0, which was generated by GNU Autoconf 2.72.  Invocation command line was    CONFIG_FILES    = $CONFIG_FILES@@ -11948,7 +11948,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\-ugrep config.status 7.7.0+ugrep config.status 7.8.0 configured by $0, generated by GNU Autoconf 2.72,   with options \\"\$ac_cs_config\\" 

configure.ac

@@ -1,4 +1,4 @@-AC_INIT([ugrep],[7.7.0],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com])+AC_INIT([ugrep],[7.8.0],[https://github.com/Genivia/ugrep/issues],[ugrep],[https://ugrep.com]) AM_INIT_AUTOMAKE([foreign subdir-objects dist-xz no-dist-gzip]) AC_CONFIG_HEADERS([config.h]) AC_COPYRIGHT([Copyright (C) 2019-2026 Robert van Engelen, Genivia Inc.])

man/ug.1

@@ -1,4 +1,4 @@-.TH UGREP "1" "April 21, 2026" "ugrep 7.7.0" "User Commands"+.TH UGREP "1" "April 29, 2026" "ugrep 7.8.0" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS@@ -892,8 +892,9 @@ Display version with linked libraries and exit. Selected lines are those not matching any of the specified patterns. .TP-\fB\-\-view\fR[=\fICOMMAND\fR]-Use COMMAND to view/edit a file in \fB\-Q\fR query TUI by pressing CTRL\-Y.+\fB\-\-view\fR[=[+]COMMAND]+Use COMMAND to view/edit a file in \fB\-Q\fR query TUI by pressing CTRL\-Y,++COMMAND waits for a key press after COMMAND terminated. .TP \fB\-W\fR, \fB\-\-with\-hex\fR Output binary matches in hexadecimal, leaving text matches alone.@@ -970,7 +971,8 @@ bzip2 (.bz, .bz2, .bzip2, .tbz, .tbz2, .tb2, .tz2), xz (.xz, .txz) and lzma (requires suffix .lzma, .tlz), zstd (.zst, .zstd, .tzst), lz4 (requires suffix .lz4),-brotli (requires suffix .br).+brotli (requires suffix .br),+bzip3 (requires suffix .bz3). .TP \fB\-\-zmax\fR=\fINUM\fR When used with option \fB\-z\fR or \fB\-\-decompress\fR, searches the contents of

man/ugrep-indexer.1

@@ -1,4 +1,4 @@-.TH UGREP-INDEXER "1" "April 21, 2026" "ugrep-indexer 7.7.0" "User Commands"+.TH UGREP-INDEXER "1" "April 29, 2026" "ugrep-indexer 7.8.0" "User Commands" .SH NAME \fBugrep-indexer\fR -- file indexer to accelerate recursive searching .SH SYNOPSIS@@ -147,7 +147,8 @@ 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),-brotli (requires suffix .br).+brotli (requires suffix .br),+bzip3 (requires suffix .bz3). .TP \fB\-\-zmax\fR=\fINUM\fR When used with option \fB\-z\fR (\fB\-\-decompress\fR), indexes the contents of

man/ugrep.1

@@ -1,4 +1,4 @@-.TH UGREP "1" "April 21, 2026" "ugrep 7.7.0" "User Commands"+.TH UGREP "1" "April 29, 2026" "ugrep 7.8.0" "User Commands" .SH NAME \fBugrep\fR, \fBug\fR -- file pattern searcher .SH SYNOPSIS@@ -892,8 +892,9 @@ Display version with linked libraries and exit. Selected lines are those not matching any of the specified patterns. .TP-\fB\-\-view\fR[=\fICOMMAND\fR]-Use COMMAND to view/edit a file in \fB\-Q\fR query TUI by pressing CTRL\-Y.+\fB\-\-view\fR[=[+]COMMAND]+Use COMMAND to view/edit a file in \fB\-Q\fR query TUI by pressing CTRL\-Y,++COMMAND waits for a key press after COMMAND terminated. .TP \fB\-W\fR, \fB\-\-with\-hex\fR Output binary matches in hexadecimal, leaving text matches alone.@@ -970,7 +971,8 @@ bzip2 (.bz, .bz2, .bzip2, .tbz, .tbz2, .tb2, .tz2), xz (.xz, .txz) and lzma (requires suffix .lzma, .tlz), zstd (.zst, .zstd, .tzst), lz4 (requires suffix .lz4),-brotli (requires suffix .br).+brotli (requires suffix .br),+bzip3 (requires suffix .bz3). .TP \fB\-\-zmax\fR=\fINUM\fR When used with option \fB\-z\fR or \fB\-\-decompress\fR, searches the contents of

src/query.cpp

@@ -42,6 +42,7 @@ #include <iostream> #include <fstream> #include <thread>+#include <chrono> #include <fcntl.h>  #ifdef OS_WIN@@ -2518,7 +2519,9 @@ void Query::view()       // file was changed when viewed, e.g. by an editor?       bool changed = false; -      // track elapsed time: if the command terminates very quickly within 500ms, then let the user press a key+      // track elapsed time: if the command terminates very quickly within 100ms, then wait 1s+      reflex::timer_type et;+      reflex::timer_start(et);        if (flag_stdin && filename == flag_label)       {@@ -2634,22 +2637,23 @@ void Query::view()       VKey::flush(); #endif -      if (ok)-      { #ifdef OS_WIN-        if (keypress || strcmp(flag_view, "more") == 0)+      if (ok && (keypress || strcmp(flag_view, "more") == 0)) #else-        if (keypress)+      if (ok && keypress) #endif-        {-          // command terminated very quickly within 500ms-          Screen::setpos(Screen::rows - 1, 0);-          Screen::invert();-          Screen::put("(END)");-          Screen::normal();-          Screen::put(" press a key ");-          VKey::get();-        }+      {+        Screen::setpos(Screen::rows - 1, 0);+        Screen::invert();+        Screen::put("(END)");+        Screen::normal();+        Screen::put(" press a key ");+        VKey::get();+      }+      else if (reflex::timer_elapsed(et) < 100)+      {+        // command terminated very quickly within 100ms+        std::this_thread::sleep_for(std::chrono::seconds(1));       }        if (changed)

src/ugrep-indexer.cpp

@@ -35,7 +35,7 @@ */  // DO NOT ALTER THIS LINE: updated by makemake.sh and we need it physically here for MSVC++ build from source-#define UGREP_VERSION "7.7.0"+#define UGREP_VERSION "7.8.0"  // use a task-parallel thread to decompress the stream into a pipe to search, also handles nested archives #define WITH_DECOMPRESSION_THREAD

src/ugrep.hpp

@@ -38,7 +38,7 @@ #define UGREP_HPP  // DO NOT ALTER THIS LINE: updated by makemake.sh and we need it physically here for MSVC++ build from source-#define UGREP_VERSION "7.7.0"+#define UGREP_VERSION "7.8.0"  // disable mmap because mmap is almost always slower than the file reading speed improvements since 3.0.0 #define WITH_NO_MMAP