about summary refs log tree commit diff
path: root/Completion/Unix/Command/_compress
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-06-25 09:03:04 +0000
commita267832ddf4150652fde3936858841bb2edbd9ae (patch)
tree961f0cbcaf8dbdaf2ff2e1a5409d644158f592bf /Completion/Unix/Command/_compress
parentdd54fb249881fa882319cd2642780dcebb8d9f7c (diff)
downloadzsh-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/_compress')
-rw-r--r--Completion/Unix/Command/_compress14
1 files changed, 7 insertions, 7 deletions
diff --git a/Completion/Unix/Command/_compress b/Completion/Unix/Command/_compress
index a2e52704e..b8f691373 100644
--- a/Completion/Unix/Command/_compress
+++ b/Completion/Unix/Command/_compress
@@ -1,6 +1,6 @@
 #compdef compress uncompress -redirect-,<,uncompress=uncompress -redirect-,>,compress=uncompress -redirect-,<,compress=compress
 
-local expl state line bits common_args1 common_args2 decompress
+local expl state line bits common_args1 common_args2 decompress ret=1
 local curcontext="$curcontext"
 typeset -A opt_args
 bits=( {9..16} )
@@ -23,14 +23,14 @@ case "$service" in
       "-b[specify maximum number of bits used to replace common substring]:bits:(${bits[*]})" \
       '-C[produce output compatible with BSD 2.0]' \
       '(-b -C)-d[decompress]' \
-      "${common_args2[@]}" && return 0
+      "${common_args2[@]}" && ret=0
   ;;
   uncompress)
-    _arguments -C -s "${common_args2[@]}" && return 0
+    _arguments -C -s "${common_args2[@]}" && ret=0
     decompress=yes
   ;;
   zcat)
-    _arguments -C -s "${common_args1[@]}" && return 0
+    _arguments -C -s "${common_args1[@]}" && ret=0
     decompress=yes
   ;;
 esac
@@ -38,11 +38,11 @@ esac
 if [[ "$state" = files ]]; then
   if [[ -z "$decompress" ]] || (( $+opt_args[-d] )); then
     _description files expl 'file to compress'
-    _files "$expl[@]" -g '*~*.Z' && return 0
+    _files "$expl[@]" -g '*~*.Z' && return
   else
     _description files expl 'compressed file'
-    _files "$expl[@]" -g '*.Z' && return 0
+    _files "$expl[@]" -g '*.Z' && return
   fi
 fi
 
-return 1
+return ret