mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-20 06:56:05 +02:00
44675: _find: Fix return status
This commit is contained in:
parent
d5ca9fd80f
commit
c6254f2a93
|
@ -1,5 +1,7 @@
|
|||
2019-08-17 dana <dana@dana.is>
|
||||
|
||||
* 44675: Completion/Unix/Command/_find: Fix return status
|
||||
|
||||
* unposted: NEWS: Mention `functions -c`
|
||||
|
||||
2019-08-14 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue