1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-10-03 09:21:19 +02:00
zsh/Completion/Core/_wanted
2000-04-01 20:43:43 +00:00

34 lines
564 B
Plaintext

#autoload
local targs gopt=-J
if [[ "$1" = -C?* ]]; then
targs=( -C "${1[3,-1]}" )
shift
elif [[ "$1" = -C ]]; then
targs=( -C "$2" )
shift 2
else
targs=()
fi
if [[ "$1" = -([12]|)[VJ] ]]; then
gopt="$1"
shift
fi
if [[ $# -gt 3 ]]; then
if _tags "$targs[@]" "$1"; then
_comp_tags="$_comp_tags $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" && _comp_tags="$_comp_tags $1"
fi