diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-06-25 09:03:04 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-06-25 09:03:04 +0000 |
commit | a267832ddf4150652fde3936858841bb2edbd9ae (patch) | |
tree | 961f0cbcaf8dbdaf2ff2e1a5409d644158f592bf /Completion/Unix/Command/_gzip | |
parent | dd54fb249881fa882319cd2642780dcebb8d9f7c (diff) | |
download | zsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.gz zsh-a267832ddf4150652fde3936858841bb2edbd9ae.tar.xz zsh-a267832ddf4150652fde3936858841bb2edbd9ae.zip |
18631: returning too early breaks prefix-needed style set to false
Diffstat (limited to 'Completion/Unix/Command/_gzip')
-rw-r--r-- | Completion/Unix/Command/_gzip | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Completion/Unix/Command/_gzip b/Completion/Unix/Command/_gzip index 8c3c8c8c3..3f5aeb1b7 100644 --- a/Completion/Unix/Command/_gzip +++ b/Completion/Unix/Command/_gzip @@ -1,6 +1,6 @@ #compdef gzip gunzip gzcat=gunzip -redirect-,<,gunzip=gunzip -redirect-,>,gzip=gunzip -redirect-,<,gzip=gzip -value-,GZIP,-default- -local decompress files expl curcontext="$curcontext" state line +local decompress files expl curcontext="$curcontext" state line ret=1 typeset -A opt_args files=( '*:files:->files' ) @@ -58,7 +58,7 @@ gzip) '(--fast -1 -2 -3 -4 -5 -6 -7 -9 --best)-8' \ '(--fast -1 -2 -3 -4 -5 -6 -7 -8 --best)-9' \ '(--fast -1 -2 -3 -4 -5 -6 -7 -8 -9 )--best' \ - "$files[@]" && return 0 + "$files[@]" && ret=0 ;; esac @@ -71,19 +71,21 @@ files) if (( $+opt_args[-r] || $+opt_args[--recursive] )); then if [[ -z "$decompress" ]]; then _description directories expl 'directory to compress' - _files "$expl[@]" -/ + _files "$expl[@]" -/ && return else _description directories expl 'compressed directory' - _files "$expl[@]" -/ + _files "$expl[@]" -/ && return fi else if [[ -z "$decompress" ]]; then _description files expl 'file to compress' - _files "$expl[@]" -g '*~*.(([tT]|)[gG]|)[zZ]' + _files "$expl[@]" -g '*~*.(([tT]|)[gG]|)[zZ]' && return else _description files expl 'compressed file' - _files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ]' + _files "$expl[@]" -g '*.(([tT]|)[gG]|)[zZ]' && return fi fi ;; esac + +return ret |