summaryrefslogtreecommitdiff
path: root/Completion/User/_bzip2
diff options
context:
space:
mode:
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