diff options
Diffstat (limited to 'Completion/Unix/Command/_find')
-rw-r--r-- | Completion/Unix/Command/_find | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find index edd46ac1c..916fcf2e6 100644 --- a/Completion/Unix/Command/_find +++ b/Completion/Unix/Command/_find @@ -1,6 +1,6 @@ #compdef find gfind -local curcontext="$curcontext" state_descr variant default +local curcontext="$curcontext" state_descr variant default ret=1 local -a state line args alts disp smatch _pick_variant -r variant gnu=GNU $OSTYPE -version @@ -98,7 +98,7 @@ case $variant in args+=( '(- *)-help' '(-)--help' '(- *)-version' '(-)--version' - '-D[print diagnostics]:debug option:(help tree search stat rates opt exec)' + '-D[print diagnostics]:debug option:(exec opt rates search stat time tree all help)' '-O+[enable query optimisation]:level:(1 2 3)' '*-daystart' '-regextype:regexp syntax:(help findutils-default awk egrep ed emacs gnu-awk grep posix-awk posix-basic posix-egrep posix-extended posix-minimal-basic sed)' @@ -116,7 +116,7 @@ case $variant in '*-fprintf:output file:_files:output format' '*-printf:output format' ) - [[ $OSTYPE = linux-gnu ]] && args+=( '*-context:SELinux context' ) + [[ $OSTYPE = linux-gnu ]] && args+=( '*-context:SELinux context (glob pattern):_selinux_contexts' ) ;; esac @@ -147,7 +147,8 @@ _arguments -C $args \ '*-user:user:_users' \ '*-xdev' \ '*-a' '*-o' \ - '(-D -E -H -L -O -P -f -s -x --help --version)*:directory:_files -/' + '(-D -E -H -L -O -P -f -s -x --help --version)*:directory:_files -/' \ +&& ret=0 if [[ $state = times ]]; then if ! compset -P '[+-]' || [[ -prefix '[0-9]' ]]; then @@ -164,5 +165,7 @@ if [[ $state = times ]]; then alts=( "senses:sense${default}:compadd -V times -S '' -d disp -a smatch" ) fi alts+=( "times:${state_descr}:_dates -f d" ) - _alternative $alts + _alternative $alts && ret=0 fi + +return ret |