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/Zsh/Command/_compdef | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Completion/Zsh/Command/_compdef') diff --git a/Completion/Zsh/Command/_compdef b/Completion/Zsh/Command/_compdef index aad1358b9..7a64da835 100644 --- a/Completion/Zsh/Command/_compdef +++ b/Completion/Zsh/Command/_compdef @@ -32,7 +32,7 @@ _arguments -C -s -S \ '*-P[completion for command matching pattern]' \ ':completion function:->cfun' \ '*:commands:->com' \ - "$args2[@]" && return 0 + "$args2[@]" && ret=0 if [[ $state = multi ]]; then case $(( CURRENT % 3 )) in @@ -50,20 +50,20 @@ case $state in if (( pat && pat > normal )); then _message -e patterns 'pattern' else - _command_names + _command_names && ret=0 fi ;; ccom) - _wanted commands expl 'completed command' compadd -k _comps + _wanted commands expl 'completed command' compadd -k _comps && ret=0 ;; cfun) list=( ${^fpath:/.}/_(|*[^~])(:t) ) if zstyle -T ":completion:${curcontext}:functions" prefix-hidden; then disp=( ${list[@]#_} ) _wanted functions expl 'completion function' \ - compadd -d disp -a list + compadd -d disp -a list && ret=0 else - _wanted functions expl 'completion function' compadd -a list + _wanted functions expl 'completion function' compadd -a list && ret=0 fi ;; style) @@ -71,6 +71,8 @@ case $state in compadd -M 'r:|-=* r:|=*' \ complete-word delete-char-or-list expand-or-complete \ expand-or-complete-prefix list-choices menu-complete \ - menu-expand-or-complete reverse-menu-complete + menu-expand-or-complete reverse-menu-complete && ret=0 ;; esac + +return ret -- cgit v1.2.3-70-g09d2