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/_requested | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'Completion/Core/_requested') diff --git a/Completion/Core/_requested b/Completion/Core/_requested index b5efb5a9e..41122819a 100644 --- a/Completion/Core/_requested +++ b/Completion/Core/_requested @@ -1,15 +1,20 @@ #autoload -local tag +local gopt=-J -if [[ "$1" = -[VJ]* ]]; then - tag="$2" -else - tag="$1" +if [[ "$1" = -([12]|)[VJ] ]]; then + gopt="$1" + shift fi -comptags -R "$tag" && _comp_tags="$_comp_tags $tag" && - if [[ $# -gt 1 ]]; then - _description "$@" - return 0 - fi +if comptags -R "$1"; then + _comp_tags="$_comp_tags $1" + if [[ $# -gt 3 ]]; then + _loop "$gopt" "$@" + elif [[ $# -gt 1 ]]; then + _description "$gopt" "$@" + fi + return 0 +else + return 1 +fi -- cgit 1.4.1