diff options
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 |