From a267832ddf4150652fde3936858841bb2edbd9ae Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 25 Jun 2003 09:03:04 +0000 Subject: 18631: returning too early breaks prefix-needed style set to false --- Completion/Unix/Command/_bzip2 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Completion/Unix/Command/_bzip2') diff --git a/Completion/Unix/Command/_bzip2 b/Completion/Unix/Command/_bzip2 index cbce91ad6..15a78e578 100644 --- a/Completion/Unix/Command/_bzip2 +++ b/Completion/Unix/Command/_bzip2 @@ -1,6 +1,6 @@ #compdef bzip2 bunzip2 bzcat=bunzip2 bzip2recover -redirect-,<,bunzip2=bunzip2 -redirect-,>,bzip2=bunzip2 -redirect-,<,bzip2=bzip2 -local decompress expl state line curcontext="$curcontext" +local decompress expl state line curcontext="$curcontext" ret=1 typeset -A opt_args case "$service" in @@ -39,7 +39,7 @@ case "$service" 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' && return 0 + '*:files:->files' && ret=0 ;; esac @@ -49,11 +49,11 @@ if [[ "$state" = files ]]; then $+opt_args[--test] )) && unset decompress if [[ -z "$decompress" ]]; then _description files expl 'compressed file' - _files "$expl[@]" -g '*.(bz2|tbz|tbz2)' && return 0 + _files "$expl[@]" -g '*.(bz2|tbz|tbz2)' && return else _description files expl 'file to compress' - _files "$expl[@]" -g '*~*.(bz2|tbz|tbz2)' && return 0 + _files "$expl[@]" -g '*~*.(bz2|tbz|tbz2)' && return fi fi -return 1 +return ret -- cgit 1.4.1