diff options
author | Peter Stephenson <pws@users.sourceforge.net> | 2008-07-21 19:15:22 +0000 |
---|---|---|
committer | Peter Stephenson <pws@users.sourceforge.net> | 2008-07-21 19:15:22 +0000 |
commit | 5b29fedad850299950195a1878fe4923778f9dcc (patch) | |
tree | 100a2decba0f1b6f8c4ed1b866bddd5f2ff57019 /Completion/Unix/Command/_pkg_instance | |
parent | 2d2d341161ca6699a6efd6981c3a9fd7fe52e6d6 (diff) | |
download | zsh-5b29fedad850299950195a1878fe4923778f9dcc.tar.gz zsh-5b29fedad850299950195a1878fe4923778f9dcc.tar.xz zsh-5b29fedad850299950195a1878fe4923778f9dcc.zip |
25324: Danek Duvall: some Solaris and more general completions
Diffstat (limited to 'Completion/Unix/Command/_pkg_instance')
-rw-r--r-- | Completion/Unix/Command/_pkg_instance | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_pkg_instance b/Completion/Unix/Command/_pkg_instance new file mode 100644 index 000000000..3f4c49219 --- /dev/null +++ b/Completion/Unix/Command/_pkg_instance @@ -0,0 +1,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 |