From e025336f2f6d9f107ee1e03b9900f04af0544ba9 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Sat, 1 Apr 2000 20:43:43 +0000 Subject: Updated from list as far as 10376 --- Completion/Core/_wanted | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Completion/Core/_wanted') diff --git a/Completion/Core/_wanted b/Completion/Core/_wanted index 7baa3e724..32875ec57 100644 --- a/Completion/Core/_wanted +++ b/Completion/Core/_wanted @@ -1,6 +1,6 @@ #autoload -local targs +local targs gopt=-J if [[ "$1" = -C?* ]]; then targs=( -C "${1[3,-1]}" ) @@ -12,10 +12,22 @@ else targs=() fi -[[ "$1" = -(|-) ]] && shift +if [[ "$1" = -([12]|)[VJ] ]]; then + gopt="$1" + shift +fi + +if [[ $# -gt 3 ]]; then + if _tags "$targs[@]" "$1"; then + _comp_tags="$_comp_tags $1" -if [[ $# -gt 1 ]]; then - _tags "$targs[@]" "$1" && _description "${(@)argv[2,-1]}" + _all_labels -t "$gopt" "$@" + else + return 1 + fi +elif [[ $# -gt 1 ]]; then + _tags -- "$targs[@]" "$1" && _comp_tags="$_comp_tags $1" && + _description "$gopt" "$@" else - _tags "$targs[@]" "$1" + _tags -- "$targs[@]" "$1" && _comp_tags="$_comp_tags $1" fi -- cgit 1.4.1