about summary refs log tree commit diff
path: root/Completion/Unix/Command/_lzop
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/_lzop
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/_lzop')
-rw-r--r--Completion/Unix/Command/_lzop12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Unix/Command/_lzop b/Completion/Unix/Command/_lzop
index bb918fd30..bad9c14d4 100644
--- a/Completion/Unix/Command/_lzop
+++ b/Completion/Unix/Command/_lzop
@@ -1,6 +1,6 @@
 #compdef lzop
 
-local expl state line decompress disp curcontext="$curcontext" sep
+local expl state line decompress disp curcontext="$curcontext" sep ret=1
 typeset -A opt_args
 
 _arguments -C -s \
@@ -74,7 +74,7 @@ _arguments -C -s \
   '--color[assume a color ANSI terminal]' \
   '--intro[display intro sequence]' \
   '--filter=[preprocess data with a special multimedia filter]:number' \
-  '*:files:->files' && return 0
+  '*:files:->files' && ret=0
 
 case "$state" in
   files)
@@ -83,10 +83,10 @@ case "$state" in
 	$+opt_args[--test] || $+opt_args[-t] || $+opt_args[--list] ||
 	$+opt_args[-l] || $+opt_args[--ls] || $+opt_args[--info] )); then
       _description files expl 'compressed file'
-      _files "$expl[@]" -g '*.[tl]zo'
+      _files "$expl[@]" -g '*.[tl]zo' && ret=0
     else
       _description files expl 'file to compress'
-      _files "$expl[@]" -g '*~*.[tl]zo'
+      _files "$expl[@]" -g '*~*.[tl]zo' && ret=0
 
     fi
   ;;
@@ -98,6 +98,8 @@ case "$state" in
       "Q $sep Enclose file names in double quotes" )
     disp=( ${disp[@]:#[Z$PREFIX]*} )
     compset -P '[FGQ]*'
-    compadd -d disp - ${disp[@]%% *}
+    compadd -d disp - ${disp[@]%% *} && ret=0
   ;;
 esac
+
+return ret