Releases: Genivia/ugrep
ugrep v6.4
What's new?
- new custom output format fields for options
--format
and--replace
#414:%A byte range in hex of match %l last line number of match %L number of lines of a match %R newline, if --break %[hhhh]U U+hhhh Unicode code point %y matching pattern as hex %Y matching line as hex %[ms]=...%= color of ms ... color off %[n]j nth capture as JSON %[n]q nth capture quoted %[n]x nth capture as XML %[n]y nth capture as hex %[n]v nth capture as CSV %[name]j named capture as JSON %[name]q named capture quoted %[name]x named capture as XML %[name]y named capture as hex %[name]v named capture as CSV %[n|...]j capture n,... as JSON %[n|...]q capture n,... quoted %[n|...]x capture n,... as XML %[n|...]y capture n,... as hex %[n|...]v capture n,... as CSV
- numeric fields such as
%n
are padded with spaces when%{width}n
is specified with a numericwidth
> 0 - matching line fields such as
%O
are cut to width when%{width}O
is specified or when%{-width}O
is specified to cut from the end of the line - character context on a matching line before or after a match is output when
%{-width}o
or%{+width}o
is specified for match fields such as%o
, where%{width}o
without a +/- sign cuts the match to the specified width
- numeric fields such as
- fix bash completions for key bindings #415
ugrep v6.3
What's new?
- option
--index
always enables--recursive
#410 - new bash, fish and zsh ugrep-indexer completions #411
- option
--hyperlink
outputs absolute search paths #412 - update regex DFA cut optimization that was too agressive for some patterns
- option
-o
(--only-matching
) with-ABC
context now also supports multi-line pattern matching with\n
(newline) in regex patterns
Note: again extensively tested with random (fuzzed) patterns to verify the match algorithms and optimizations.
ugrep v6.2
What's new?
- improved support for legacy grep color environment variable single ANSI color codes format #407, for example:
env GREP_COLOR='7;33' ug PATTERN FILE
highlights matches in inverted yellow; alsoug --colors='7;33' PATTERN FILE
does the same and so doesug --colors=iy PATTERN FILE
using ugrep's color letter selections - improved Docker files #408
- improved zsh
-ABC
options completion #409 - improved option
-%
(--bool
) when multiple-e PATTERN
are specified; now aligns with the documentation of option-e
to match any of the specifiedPATTERN
(note that-%
can be combined with options--and
,--andnot
,--not
.-e
amd-N
) - improved option
-Q
(--query
) when combined with options--and
,--andnot
,--not
by activatating option-%
(--bool
) so that the combined search patterns can be edited as one Boolean query pattern in the TUI - minor speed improvement when searching in large files with option
-f
with a file with hundreds, thousands or more words/strings to find (-fwords/4.txt
in benchmarks) - again extensively tested with randomized patterns
ugrep v6.1
What's new?
- improves option
-w
to support Unicode as planned #234 - makes
[[:alpha:]]
and other[::]
character classes also match Unicode by default, like\p{Class}
already does, unless option-U
(--ascii
or--binary
) is used #234 - Unicode word boundaries
\<
,\>
,\b
,\B
unless option-U
(--ascii
or--binary
) is used #234 - adds static Linux builds for x64 and AArch64 #373 #398 but still needs a script via wget for easy non-admin install on a system (work in progress, but I don't want to include these static binaries in the future, see #373 and feel free to comment)
- improves bash and zsh auto-completion usability #395 #394 #392
Note: no significant speed updates to report at this time
ugrep v6.0
What's new?
- quicker! 🚀 much faster search speeds on ARM CPUs and also faster overall on other CPUs using essentially the same SIMD algorithms but better optimized #385 see latest ugrep benchmarks for results
- more good stuff! 🎉 includes ugrep-indexer, which is installed together with ugrep, see ugrep-indexer release notes v1.0.0
Please note
- Distribution maintainers please check if ugrep-indexer and its manual page is indeed also included in your ugrep distribution package and will be installed on user systems. Thank you! 🙏❤️
ugrep v5.1.4
What's new?
- fix glitch #383 option
-A
may omit an after context line for regex patterns that start with a wildcard "zero or more" repetition such as.*
ugrep v5.1.3
What's new?
- revert some of the third-party suggested configure scrip changes, this should make Homebrew ugrep include compression libraries again #380
ugrep v5.1.2
What's new?
- updated configure and makefiles to improve SIMD (SSE2/AVX2/AVX512BW/NEON/AArch64) detection and cross-compilation
- removed unused m4/ax_check scripts, adding corresponding
PKG_CHECK_MODULES
to configure.ac instead - update some of the ctype function calls to avoid potential signedness pitfalls
- AIX build #374
- use
statfs()
with options--include-fs
and--exclude-fs
when the preferredstatvfs()
is not available - suppress
--filter
utility stderr messages when ugrep options-s
(--no-messages
) and-q
(--quiet
) are used #377 - fix Cygwin
--filter
utility hanging after fork when worker threads are active, by forcing single-threaded search (a bit crude, but Cygwin fork isn't identical to Unix fork) - support the
NO_COLOR
environment variable to suppress color output - fix TUI scroll glitch (cursor down to scroll screen content up) in non-split screen (glitch appeared when adding the split screen feature)
- TUI line selection mode top row number indicator added, for consistency
- TUI quit & output after line selection mode now behaves the same as non-TUI search output, for consistency
- faster
-q
(--quiet
) search
ugrep v5.1.1
What's new?
A minor update to fix a problem with POSIX lazy quantifier matching when combined with anchors, causing longer pattern matches than expected #369
ugrep v5.1.0
What's new?
- a minor improvement of the regex syntax to allow escaped spaces #360
- updated POSIX regex lazy quantifier matching in linear time using an advanced DFA transformation algorithm #174
Notes
Lazy quantifier POSIX regex matching with efficient DFAs is/was claimed to be impossible in the past, when in fact I wrote a new algorithm for the high-performance RE/flex regex matcher in 2015/2016. This latest installment of the DFA construction algorithm makes the syntax and behavior of POSIX regex lazy quantifier matching align with Perl regex lazy quantifier matching. Lazy quantifiers are of the form ??
(lazy optional) and *?
and +?
(lazy repetitions) to match no more than necessary, typically by backtracking until matching (Perl). Note that ugrep and RE/flex pattern matching is efficiently performed with a DFA in linear time, i.e. matching is backtrack-free. Pattern searching also uses match predictions to avoid backtracking.