Skip to content

Commit

Permalink
released 3.6
Browse files Browse the repository at this point in the history
fix #410
fix #411
fix #412
  • Loading branch information
genivia-inc committed Jul 31, 2024
1 parent 148290c commit b8b0e37
Show file tree
Hide file tree
Showing 65 changed files with 840 additions and 519 deletions.
6 changes: 3 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ CONFIGH = $(shell pwd)/$(top_builddir)/config.h

if ENABLE_BASH_COMPLETION
bashcompletiondir = $(BASH_COMPLETION_DIR)
dist_bashcompletion_DATA = $(top_builddir)/completions/bash/ug
dist_bashcompletion_DATA = $(top_builddir)/completions/bash/ug $(top_builddir)/completions/bash/ugrep-indexer
endif

if ENABLE_FISH_COMPLETION
fishcompletiondir = $(FISH_COMPLETION_DIR)
dist_fishcompletion_DATA = $(top_builddir)/completions/fish/ug.fish
dist_fishcompletion_DATA = $(top_builddir)/completions/fish/ug.fish $(top_builddir)/completions/fish/ugrep-indexer.fish
endif

if ENABLE_ZSH_COMPLETION
zshcompletiondir = $(ZSH_COMPLETION_DIR)
dist_zshcompletion_DATA = $(top_builddir)/completions/zsh/_ug
dist_zshcompletion_DATA = $(top_builddir)/completions/zsh/_ug $(top_builddir)/completions/zsh/_ugrep-indexer
endif

all-local: cp2bin
Expand Down
15 changes: 9 additions & 6 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -176,11 +176,14 @@ am__installdirs = "$(DESTDIR)$(man1dir)" \
NROFF = nroff
MANS = $(man1_MANS)
am__dist_bashcompletion_DATA_DIST = \
$(top_builddir)/completions/bash/ug
$(top_builddir)/completions/bash/ug \
$(top_builddir)/completions/bash/ugrep-indexer
am__dist_fishcompletion_DATA_DIST = \
$(top_builddir)/completions/fish/ug.fish
$(top_builddir)/completions/fish/ug.fish \
$(top_builddir)/completions/fish/ugrep-indexer.fish
am__dist_zshcompletion_DATA_DIST = \
$(top_builddir)/completions/zsh/_ug
$(top_builddir)/completions/zsh/_ug \
$(top_builddir)/completions/zsh/_ugrep-indexer
DATA = $(dist_bashcompletion_DATA) $(dist_fishcompletion_DATA) \
$(dist_zshcompletion_DATA)
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
Expand Down Expand Up @@ -391,11 +394,11 @@ EXTRA_DIST = README.md LICENSE.txt CONTRIBUTING.md CODE_OF_CONDUCT.md
UGREP = $(shell pwd)/$(top_builddir)/bin/ugrep$(EXEEXT)
CONFIGH = $(shell pwd)/$(top_builddir)/config.h
@ENABLE_BASH_COMPLETION_TRUE@bashcompletiondir = $(BASH_COMPLETION_DIR)
@ENABLE_BASH_COMPLETION_TRUE@dist_bashcompletion_DATA = $(top_builddir)/completions/bash/ug
@ENABLE_BASH_COMPLETION_TRUE@dist_bashcompletion_DATA = $(top_builddir)/completions/bash/ug $(top_builddir)/completions/bash/ugrep-indexer
@ENABLE_FISH_COMPLETION_TRUE@fishcompletiondir = $(FISH_COMPLETION_DIR)
@ENABLE_FISH_COMPLETION_TRUE@dist_fishcompletion_DATA = $(top_builddir)/completions/fish/ug.fish
@ENABLE_FISH_COMPLETION_TRUE@dist_fishcompletion_DATA = $(top_builddir)/completions/fish/ug.fish $(top_builddir)/completions/fish/ugrep-indexer.fish
@ENABLE_ZSH_COMPLETION_TRUE@zshcompletiondir = $(ZSH_COMPLETION_DIR)
@ENABLE_ZSH_COMPLETION_TRUE@dist_zshcompletion_DATA = $(top_builddir)/completions/zsh/_ug
@ENABLE_ZSH_COMPLETION_TRUE@dist_zshcompletion_DATA = $(top_builddir)/completions/zsh/_ug $(top_builddir)/completions/zsh/_ugrep-indexer
all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive

Expand Down
26 changes: 15 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3133,6 +3133,8 @@ To display the line and column numbers of matches in XML with `--xml`:
(invert), `u' (underline). Parameter `hl' enables file name
hyperlinks. Parameter `rv' reverses the `sl=' and `cx=' parameters
when option -v is specified. Selectively overrides GREP_COLORS.
Legacy grep single parameter codes may be specified, for example
--colors='7;32' or --colors=ig to set ms (match selected).
--tag[=TAG[,END]]
Disables colors to mark up matches with TAG. END marks the end of
a match if specified, otherwise TAG. The default is `___'.
Expand Down Expand Up @@ -4130,7 +4132,9 @@ in markdown:
`i' (invert), `u' (underline). Parameter `hl' enables file name
hyperlinks. Parameter `rv' reverses the `sl=' and `cx='
parameters when option -v is specified. Selectively overrides
GREP_COLORS.
GREP_COLORS. Legacy grep single parameter codes may be specified,
for example --colors='7;32' or --colors=ig to set ms (match
selected).

--config[=FILE], ---[FILE]
Use configuration FILE. The default FILE is `.ugrep'. The
Expand Down Expand Up @@ -4435,17 +4439,17 @@ in markdown:
priority over --include-fs=MOUNTS. This option may be repeated.

--index
Perform index-based recursive search. This option assumes, but
does not require, that files are indexed with ugrep-indexer. This
option accelerates recursive searching by skipping non-matching
files, archives and compressed files when indexed. Significant
Perform fast index-based recursive search. This option assumes,
but does not require, that files are indexed with ugrep-indexer.
This option also enables option -r or --recursive. Skips indexed
non-matching files, archives and compressed files. Significant
acceleration may be achieved on cold (not file-cached) and large
file systems, or any file system that is slow to search. Note
that the start-up time to search is increased, which may be
significant when complex search patterns are specified that
contain large Unicode character classes combined with `*' or `+'
repeats, which should be avoided. Option -U (--ascii) improves
performance. Option --stats displays an index search report.
that the start-up time to search may be increased when complex
search patterns are specified that contain large Unicode character
classes combined with `*' or `+' repeats, which should be avoided.
Option -U (--ascii) improves performance. Option --stats displays
an index search report.

-J NUM, --jobs=NUM
Specifies the number of threads spawned to search files. By
Expand Down Expand Up @@ -5392,7 +5396,7 @@ in markdown:



ugrep 6.2.0 July 9, 2024 UGREP(1)
ugrep 6.3.0 July 31, 2024 UGREP(1)

🔝 [Back to table of contents](#toc)

Expand Down
Binary file modified bin/win32/ug.exe
Binary file not shown.
Binary file modified bin/win32/ugrep-indexer.exe
Binary file not shown.
Binary file modified bin/win32/ugrep.exe
Binary file not shown.
Binary file modified bin/win64/ug.exe
Binary file not shown.
Binary file modified bin/win64/ugrep-indexer.exe
Binary file not shown.
Binary file modified bin/win64/ugrep.exe
Binary file not shown.
2 changes: 1 addition & 1 deletion completions/bash/ug
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ cat <<'END'
--include-dir=GLOB Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/.
--include-from=FILE Read the globs from FILE and search only files and directories whose name matches one or more globs.
--include-fs=MOUNTS Only file systems specified by MOUNTS are included in recursive searches.
--index Perform index-based recursive search.
--index Perform fast index-based recursive search.
-J NUM, --jobs=NUM Specifies the number of threads spawned to search files.
-j, --smart-case Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter.
--json Output file matches in JSON.
Expand Down
93 changes: 93 additions & 0 deletions completions/bash/ugrep-indexer
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
# bash completion for ugrep-indexer
# recommended: add the following lines to ~/.inputrc
# set colored-stats on
# set colored-completion-prefix on

if ! declare -F _init_completion >/dev/null 2>&1; then
return
fi

_comp_cmd_ugrep_indexer()
{
local IFS=$' \t\n'
local cur prev words cword
_init_completion -s || return

if [[ $cword -eq 1 && "${words[1]}" == "" ]]; then
_comp_cmd_ugrep_indexer_usage
return
fi

local i
for i in "${!words[@]}"; do
if [ "${words[$i]}" = "--" ]; then
if [ $cword -gt $i ]; then
_filedir
return
fi
words=( "${words[@]:0:$i}" )
break
fi
done

case $cur in
--*)
# complete long options by generating them
COMPREPLY=( $(compgen -W "$(_parse_help _comp_cmd_ugrep_indexer_help)" -- $cur) )
if [[ ! "${COMPREPLY[@]}" =~ "=" ]]; then
# add space after long options that do not end with a =
compopt +o nospace
fi
return
;;
-?*)
# add space after short option(s)
COMPREPLY=( $cur )
compopt +o nospace
return
;;
-)
_comp_cmd_ugrep_indexer_usage
return
;;
esac

_filedir
} &&
complete -o nospace -F _comp_cmd_ugrep_indexer ugrep-indexer

_comp_cmd_ugrep_indexer_usage()
{
local -a usage
local line i=1
usage[0]="Usage:"
# generate list of options, concat the first sentence to them
while read -r line; do
# truncate to screen width
usage[$i]=${line:0:$COLUMNS}
(( ++i ))
done < <(_comp_cmd_ugrep_indexer_help)
COMPREPLY=( "${usage[@]}" )
compopt -o nosort
}

_comp_cmd_ugrep_indexer_help()
{
cat <<'END'
--accuracy=DIGIT, -0, -1, -2, -3, -4, -5, -6, -7, -8, -9 Specifies indexing accuracy.
-., --hidden Index hidden files and directories.
-?, --help Display a help message and exit.
-c, --check Recursively check and report indexes without reindexing files.
-d, --delete Recursively remove index files.
-f, --force Force reindexing of files.
-I, --ignore-binary Do not index binary files.
-q, --quiet, --silent Quiet mode: do not display indexing statistics.
-S, --dereference-files Follow symbolic links to files.
-s, --no-messages Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages and warnings are suppressed.
-V, --version Display version and exit.
-v, --verbose Produce verbose output.
-X, --ignore-files, --ignore-files=FILE Do not index files and directories matching the globs in FILE encountered during indexing.
-z, --decompress Index the contents of compressed files and archives.
--zmax=NUM When used with option -z (--decompress), indexes the contents of compressed files and archives stored within archives by up to NUM expansion levels deep.
END
}
2 changes: 1 addition & 1 deletion completions/fish/ug+.fish
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ complete -c ug+ -l include -d 'Only search files whose name matches GLOB, same a
complete -c ug+ -l include-dir -d 'Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/'
complete -c ug+ -l include-from -d 'Read the globs from FILE and search only files and directories whose name matches one or more globs'
complete -c ug+ -l include-fs -d 'Only file systems specified by MOUNTS are included in recursive searches'
complete -c ug+ -l index -d 'Perform index-based recursive search'
complete -c ug+ -l index -d 'Perform fast index-based recursive search'
complete -c ug+ -s J -r -l jobs -d 'Specifies the number of threads spawned to search files'
complete -c ug+ -s j -l smart-case -d 'Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter'
complete -c ug+ -l json -d 'Output file matches in JSON'
Expand Down
2 changes: 1 addition & 1 deletion completions/fish/ug.fish
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ complete -c ug -l include -d 'Only search files whose name matches GLOB, same as
complete -c ug -l include-dir -d 'Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/'
complete -c ug -l include-from -d 'Read the globs from FILE and search only files and directories whose name matches one or more globs'
complete -c ug -l include-fs -d 'Only file systems specified by MOUNTS are included in recursive searches'
complete -c ug -l index -d 'Perform index-based recursive search'
complete -c ug -l index -d 'Perform fast index-based recursive search'
complete -c ug -s J -r -l jobs -d 'Specifies the number of threads spawned to search files'
complete -c ug -s j -l smart-case -d 'Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter'
complete -c ug -l json -d 'Output file matches in JSON'
Expand Down
2 changes: 1 addition & 1 deletion completions/fish/ugrep+.fish
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ complete -c ugrep+ -l include -d 'Only search files whose name matches GLOB, sam
complete -c ugrep+ -l include-dir -d 'Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/'
complete -c ugrep+ -l include-from -d 'Read the globs from FILE and search only files and directories whose name matches one or more globs'
complete -c ugrep+ -l include-fs -d 'Only file systems specified by MOUNTS are included in recursive searches'
complete -c ugrep+ -l index -d 'Perform index-based recursive search'
complete -c ugrep+ -l index -d 'Perform fast index-based recursive search'
complete -c ugrep+ -s J -r -l jobs -d 'Specifies the number of threads spawned to search files'
complete -c ugrep+ -s j -l smart-case -d 'Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter'
complete -c ugrep+ -l json -d 'Output file matches in JSON'
Expand Down
16 changes: 16 additions & 0 deletions completions/fish/ugrep-indexer.fish
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copy this file to ~/.config/fish/completions
complete -c ugrep-indexer -l accuracy -s 0 -s 1 -s 2 -s 3 -s 4 -s 5 -s 6 -s 7 -s 8 -s 9 -d 'Specifies indexing accuracy'
complete -c ugrep-indexer -l hidden -s '.' -d 'Index hidden files and directories'
complete -c ugrep-indexer -l help -s '?' -d 'Display a help message and exit'
complete -c ugrep-indexer -s c -l check -d 'Recursively check and report indexes without reindexing files'
complete -c ugrep-indexer -s d -l delete -d 'Recursively remove index files'
complete -c ugrep-indexer -s f -l force -d 'Force reindexing of files, even those that are already indexed'
complete -c ugrep-indexer -s I -l ignore-binary -d 'Do not index binary files'
complete -c ugrep-indexer -s q -l quiet -l silent -d 'Quiet mode: do not display indexing statistics'
complete -c ugrep-indexer -s S -l dereference-files -d 'Follow symbolic links to files'
complete -c ugrep-indexer -s s -l no-messages -d 'Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages and warnings are suppressed'
complete -c ugrep-indexer -s V -l version -d 'Display version and exit'
complete -c ugrep-indexer -s v -l verbose -d 'Produce verbose output'
complete -c ugrep-indexer -s X -l ignore-files -d 'Do not index files and directories matching the globs in FILE encountered during indexing'
complete -c ugrep-indexer -s z -l decompress -d 'Index the contents of compressed files and archives'
complete -c ugrep-indexer -l zmax -d 'When used with option -z (--decompress), indexes the contents of compressed files and archives stored within archives by up to NUM expansion levels deep'
2 changes: 1 addition & 1 deletion completions/fish/ugrep.fish
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ complete -c ugrep -l include -d 'Only search files whose name matches GLOB, same
complete -c ugrep -l include-dir -d 'Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/'
complete -c ugrep -l include-from -d 'Read the globs from FILE and search only files and directories whose name matches one or more globs'
complete -c ugrep -l include-fs -d 'Only file systems specified by MOUNTS are included in recursive searches'
complete -c ugrep -l index -d 'Perform index-based recursive search'
complete -c ugrep -l index -d 'Perform fast index-based recursive search'
complete -c ugrep -s J -r -l jobs -d 'Specifies the number of threads spawned to search files'
complete -c ugrep -s j -l smart-case -d 'Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter'
complete -c ugrep -l json -d 'Output file matches in JSON'
Expand Down
2 changes: 1 addition & 1 deletion completions/zsh/_ug
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B
'(1)*'--include-dir=-'[Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/]'
'(1)*'--include-from=-'[Read the globs from FILE and search only files and directories whose name matches one or more globs]'
'(1)*'--include-fs=-'[Only file systems specified by MOUNTS are included in recursive searches]'
--index'[Perform index-based recursive search]'
--index'[Perform fast index-based recursive search]'
{-J,--jobs=-}'[Specifies the number of threads spawned to search files]:NUM:( )'
{-j,--smart-case}'[Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter]'
--json'[Output file matches in JSON]'
Expand Down
2 changes: 1 addition & 1 deletion completions/zsh/_ug+
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B
'(1)*'--include-dir=-'[Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/]'
'(1)*'--include-from=-'[Read the globs from FILE and search only files and directories whose name matches one or more globs]'
'(1)*'--include-fs=-'[Only file systems specified by MOUNTS are included in recursive searches]'
--index'[Perform index-based recursive search]'
--index'[Perform fast index-based recursive search]'
{-J,--jobs=-}'[Specifies the number of threads spawned to search files]:NUM:( )'
{-j,--smart-case}'[Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter]'
--json'[Output file matches in JSON]'
Expand Down
2 changes: 1 addition & 1 deletion completions/zsh/_ugrep
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B
'(1)*'--include-dir=-'[Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/]'
'(1)*'--include-from=-'[Read the globs from FILE and search only files and directories whose name matches one or more globs]'
'(1)*'--include-fs=-'[Only file systems specified by MOUNTS are included in recursive searches]'
--index'[Perform index-based recursive search]'
--index'[Perform fast index-based recursive search]'
{-J,--jobs=-}'[Specifies the number of threads spawned to search files]:NUM:( )'
{-j,--smart-case}'[Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter]'
--json'[Output file matches in JSON]'
Expand Down
2 changes: 1 addition & 1 deletion completions/zsh/_ugrep+
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ $matchers{-G,--basic-regexp}'[Interpret patterns as basic regular expressions (B
'(1)*'--include-dir=-'[Only directories whose name matches GLOB are included in recursive searches, same as -g GLOB/]'
'(1)*'--include-from=-'[Read the globs from FILE and search only files and directories whose name matches one or more globs]'
'(1)*'--include-fs=-'[Only file systems specified by MOUNTS are included in recursive searches]'
--index'[Perform index-based recursive search]'
--index'[Perform fast index-based recursive search]'
{-J,--jobs=-}'[Specifies the number of threads spawned to search files]:NUM:( )'
{-j,--smart-case}'[Perform case insensitive matching, unless a pattern is specified with a literal upper case ASCII letter]'
--json'[Output file matches in JSON]'
Expand Down
22 changes: 22 additions & 0 deletions completions/zsh/_ugrep-indexer
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#compdef ugrep-indexer

# zsh completions for 'ugrep-indexer'

local arguments=(
{--accuracy=-,-0,-1,-2,-3,-4,-5,-6,-7,-8,-9}'[Specifies indexing accuracy, the default is 4]'
{--hidden,-.}'[Index hidden files and directories]'
'(-)'{--help,-?}'[Display a help message and exit]'
{-c,--check}'[Recursively check and report indexes without reindexing files]'
{-d,--delete}'[Recursively remove index files]'
{-f,--force}'[Force reindexing of files]'
{-I,--ignore-binary}'[Do not index binary files]'
{-q,--quiet,--silent}'[Quiet mode: do not display indexing statistics]'
{-S,--dereference-files}'[Follow symbolic links to files]'
{-s,--no-messages}'[Silent mode: nonexistent and unreadable files are ignored, i.e. their error messages and warnings are suppressed]'
{-V,--version}'[Display version with linked libraries and exit]'
{-v,--verbose}'[Produce verbose output]'
'(1)*'{-X,--ignore-files}'[Do not index files and directories matching the globs in FILE encountered during indexing]'
{-z,--decompress}'[Index the contents of compressed files and archives]'
--zmax=-'[When used with option -z (--decompress), indexes the contents of compressed files and archives stored within archives by up to NUM expansion levels deep]'
)
_arguments -s -S $arguments
Loading

0 comments on commit b8b0e37

Please sign in to comment.