-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
148290c
commit b8b0e37
Showing
65 changed files
with
840 additions
and
519 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Oops, something went wrong.