about summary refs log tree commit diff
path: root/Completion/Base/Core/_wanted
blob: 3e25fdbbc50c694ecf8ead58daea3d23954e1044 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#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

_tags "$__targs[@]" "$1"

while _tags; do
  _all_labels "$__gopt" "$@" && return 0
done

return 1