about summary refs log tree commit diff
path: root/Completion/Unix/Command/_pkg_instance
blob: 3f4c492194bbcce37601ebfbba8269993ba6a0e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#autoload

local -A opts
local whicharg

zparseopts -E -D -- '-_opts:=opts'

whicharg=${opts#*:}

case ${opts%:*} in
(installed)
	compadd "$@" - ${opt_args[$whicharg]}/var/sadm/pkg/*/pkginfo(:h:t)
	;;
(spooled)
	compadd "$@" - ${opt_args[$whicharg]}/*(:t)
	;;
(uninstalled)
	compadd "$@" - ${opt_args[$whicharg]:-/var/spool/pkg}/*/pkgmap(:h:t)
	;;
esac