mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-07-13 05:21:40 +02:00
20 lines
353 B
Text
20 lines
353 B
Text
#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
|