From 626e2aeb1657f112feb6d03c34bb9e9f44764c75 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 23 Mar 2000 04:19:26 +0000 Subject: zsh-workers/10195 --- Completion/Core/_wanted | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'Completion/Core/_wanted') diff --git a/Completion/Core/_wanted b/Completion/Core/_wanted index 400daa701..1d6dcdb59 100644 --- a/Completion/Core/_wanted +++ b/Completion/Core/_wanted @@ -1,6 +1,6 @@ #autoload -local targs tag +local targs gopt=-J if [[ "$1" = -C?* ]]; then targs=( -C "${1[3,-1]}" ) @@ -12,15 +12,22 @@ else targs=() fi -if [[ "$1" = -[VJ]* ]]; then - tag="$2" -else - tag="$1" +if [[ "$1" = -([12]|)[VJ] ]]; then + gopt="$1" + shift fi -if [[ $# -gt 1 ]]; then - _tags "$targs[@]" "$tag" && _comp_tags="$_comp_tags $tag" && - _description "$@" +if [[ $# -gt 3 ]]; then + if _tags "$targs[@]" "$1"; then + _comp_tags="$_comp_tags $1" + + _loop -t "$gopt" "$@" + else + return 1 + fi +elif [[ $# -gt 1 ]]; then + _tags "$targs[@]" "$1" && _comp_tags="$_comp_tags $1" && + _description "$gopt" "$@" else - _tags "$targs[@]" "$tag" && _comp_tags="$_comp_tags $tag" + _tags "$targs[@]" "$1" && _comp_tags="$_comp_tags $1" fi -- cgit 1.4.1