diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-21 16:13:15 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2002-01-21 16:13:15 +0000 |
commit | f463b09b133f8c798750334558b99d633c1a2219 (patch) | |
tree | 0f203d91189b49d084fee0cd32d6dc77b9a935b2 /Completion/Base/Completer | |
parent | 4f6493aff1b41e314c2ca6adf3c374b093291c21 (diff) | |
download | zsh-f463b09b133f8c798750334558b99d633c1a2219.tar.gz zsh-f463b09b133f8c798750334558b99d633c1a2219.tar.xz zsh-f463b09b133f8c798750334558b99d633c1a2219.zip |
allow arguments to be given to functions used by compdef (actually, the strings are eval'uated, so this should be powerful enough) (16472)
Diffstat (limited to 'Completion/Base/Completer')
-rw-r--r-- | Completion/Base/Completer/_complete | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Completion/Base/Completer/_complete b/Completion/Base/Completer/_complete index 28bb008ca..98d293175 100644 --- a/Completion/Base/Completer/_complete +++ b/Completion/Base/Completer/_complete @@ -85,7 +85,7 @@ if [[ -n "$compcontext" ]]; then ccarray[3]="$compcontext" comp="$_comps[$compcontext]" - [[ -z "$comp" ]] || "$comp" + [[ -n "$comp" ]] && eval "$comp" fi return @@ -94,10 +94,10 @@ fi # An entry for `-first-' is the replacement for `compctl -T' comp="$_comps[-first-]" -if [[ ! -z "$comp" ]]; then +if [[ -n "$comp" ]]; then service="${_services[-first-]:--first-}" ccarray[3]=-first- - "$comp" && ret=0 + eval "$comp" && ret=0 if [[ "$_compskip" = all ]]; then _compskip= return ret @@ -135,8 +135,8 @@ else fi comp="$_comps[-default-]" fi - [[ -z "$comp" ]] || - service="${_services[-default-]:--default-}" && "$comp" && ret=0 + [[ -n "$comp" ]] && + service="${_services[-default-]:--default-}" && eval "$comp" && ret=0 fi _compskip= |