about summary refs log tree commit diff
path: root/Completion/User/_bzip2
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2000-05-05 13:38:45 +0000
commit9f9b6e165516c4ee59b1f5b609a6890ccc3d598f (patch)
tree86460ad1a9886e6030fc1b1d1aee57668f28aa01 /Completion/User/_bzip2
parent04118530d4157d3494349e2628246b78465e08f8 (diff)
downloadzsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.gz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.tar.xz
zsh-9f9b6e165516c4ee59b1f5b609a6890ccc3d598f.zip
completion function cleanup for `_arguments' with the `-C' option and using it's return value (11195)
Diffstat (limited to 'Completion/User/_bzip2')
-rw-r--r--Completion/User/_bzip210
1 files changed, 6 insertions, 4 deletions
diff --git a/Completion/User/_bzip2 b/Completion/User/_bzip2
index f0fd23f90..53ec36967 100644
--- a/Completion/User/_bzip2
+++ b/Completion/User/_bzip2
@@ -1,6 +1,6 @@
 #compdef bzip2 bzcat bunzip2 bzip2recover
 
-local decompress expl state line
+local decompress expl state line curcontext="$curcontext"
 typeset -A opt_args
 
 case "${words[1]:t}" in
@@ -39,7 +39,7 @@ case "${words[1]:t}" in
     '(-1 -2 -3 -4 -5 -6    -8 -9)-7' \
     '(-1 -2 -3 -4 -5 -6 -7    -9)-8' \
     '(-1 -2 -3 -4 -5 -6 -7 -8	)-9' \
-    '*:files:->files'
+    '*:files:->files' && return 0
   ;;
 esac
 
@@ -49,9 +49,11 @@ if [[ "$state" = files ]]; then
       $+opt_args[--test] )) && unset decompress
   if [[ -z "$decompress" ]] ; then
     _description files expl 'compressed file'
-    _files "$expl[@]" -g '*.bz2'
+    _files "$expl[@]" -g '*.bz2' && return 0
   else
     _description files expl 'file to compress'
-    _files "$expl[@]" -g '*~*.bz2'
+    _files "$expl[@]" -g '*~*.bz2' && return 0
   fi
 fi
+
+return 1