diff options
Diffstat (limited to 'Completion/Core/_wanted')
-rw-r--r-- | Completion/Core/_wanted | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Completion/Core/_wanted b/Completion/Core/_wanted index 7baa3e724..f95d74451 100644 --- a/Completion/Core/_wanted +++ b/Completion/Core/_wanted @@ -1,6 +1,6 @@ #autoload -local targs +local targs tag if [[ "$1" = -C?* ]]; then targs=( -C "${1[3,-1]}" ) @@ -12,10 +12,14 @@ else targs=() fi -[[ "$1" = -(|-) ]] && shift +if [[ "$1" = -[VJ]* ]]; then + tag="$2" +else + tag="$1" +fi if [[ $# -gt 1 ]]; then - _tags "$targs[@]" "$1" && _description "${(@)argv[2,-1]}" + _tags "$targs[@]" "$tag" && _description "$@" else - _tags "$targs[@]" "$1" + _tags "$targs[@]" "$tag" fi |