diff options
Diffstat (limited to 'Completion/Solaris')
| -rw-r--r-- | Completion/Solaris/Command/_ipadm | 2 | ||||
| -rw-r--r-- | Completion/Solaris/Command/_pkgadd | 32 | ||||
| -rw-r--r-- | Completion/Solaris/Command/_pkginfo | 18 | ||||
| -rw-r--r-- | Completion/Solaris/Command/_pkgrm | 16 | ||||
| -rw-r--r-- | Completion/Solaris/Type/_pkg_instances | 20 |
5 files changed, 87 insertions, 1 deletions
diff --git a/Completion/Solaris/Command/_ipadm b/Completion/Solaris/Command/_ipadm index c59fc8108..c3ddd26ec 100644 --- a/Completion/Solaris/Command/_ipadm +++ b/Completion/Solaris/Command/_ipadm @@ -274,7 +274,7 @@ _ipadm() { ("dhcp:"*) _arguments -A "-*" \ - '(-w --wait)'{-w,--wait}'[Seconds to wait for completion]:number or "forever":{if [[ -prefix [0-9]## ]]; then _message -e "number of seconds"; else _wanted forever expl "number or \"forever\"" compadd forever; fi}' \ + '(-w --wait)'{-w,--wait}'[time to wait for completion]:time (seconds):_phony forever' \ '-h[Request a specific hostname]:hostname:' \ ':address object name:_ipadm_addrobjs_or_ifs' ;; diff --git a/Completion/Solaris/Command/_pkgadd b/Completion/Solaris/Command/_pkgadd new file mode 100644 index 000000000..09e6a06d0 --- /dev/null +++ b/Completion/Solaris/Command/_pkgadd @@ -0,0 +1,32 @@ +#compdef pkgadd + +_pkgadd_pass() { + _values -S : 'password descriptor' \ + '(file env console)pass[literal password]:password:' \ + '(pass file console)env[environment variable]:environment:_parameters -g "*export*"' \ + '(pass env console)file[file]:file:_files' \ + '(pass env file)console[from /dev/tty]' +} + +_pkgadd() { + _arguments -s \ + '-d[device]:device file:_files' \ + '-x[HTTP(S) proxy]:HTTP proxy: ' \ + '-k[keystore]:keystore:_files' \ + '-P[password to decrypt keystore]:password:_pkgadd_pass' \ + '-Y[select packages by category]:category: ' \ + - set1 \ + '-n[non-interactive mode]' \ + '-v[trace all scripts]' \ + '-a[admin file]:admin file:_files' \ + "-M[don't use vfstab file]" \ + '-R[root path]:root path:_files -/' \ + '-r[response file]:response file:_files' \ + '-V[alternate vfstab file]:vfstab file:_files' \ + '*:package instance:_pkg_instances --_opts uninstalled:-d' \ + - set2 \ + '-s[spool package]:spool directory:_files -/' \ + '*:package instance:_pkg_instances --_opts uninstalled:-d' +} + +_pkgadd "$@" diff --git a/Completion/Solaris/Command/_pkginfo b/Completion/Solaris/Command/_pkginfo new file mode 100644 index 000000000..26a5a866b --- /dev/null +++ b/Completion/Solaris/Command/_pkginfo @@ -0,0 +1,18 @@ +#compdef pkginfo + +_arguments -s \ + '(-q -r -x)-l[long listing]' \ + '(-l -r -x)-q[quiet mode]' \ + '(-l -q -x)-r[relocation base]' \ + '(-l -q -r)-x[extracted listing]' \ + '-c[category]:category' \ + '-a[architecture]:architecture' \ + '-v[version]:version' \ + - set1 \ + '(-p)-i[select completely installed packages]' \ + '(-i)-p[select partially installed packages]' \ + '-R[root path]:root path:_files -/' \ + '*:package instance:_pkg_instances --_opts installed:set1--R' \ + - set2 \ + '-d[device]:device file:_files' \ + '*:package instance:_pkg_instances --_opts uninstalled:set2--d' diff --git a/Completion/Solaris/Command/_pkgrm b/Completion/Solaris/Command/_pkgrm new file mode 100644 index 000000000..19fbc4409 --- /dev/null +++ b/Completion/Solaris/Command/_pkgrm @@ -0,0 +1,16 @@ +#compdef pkgrm + +_arguments -s \ + '-Y[select packages by category]:category' \ + - set1 \ + '-n[non-interactive mode]' \ + '-v[trace all scripts]' \ + '-a[admin file]:admin file:_files' \ + "-A[force removal of all files]" \ + "-M[don't use vfstab file]" \ + '-R[root path]:root path:_files -/' \ + '-V[alternate vfstab file]:vfstab file:_files' \ + '*:package instance:_pkg_instances --_opts installed:set1--R' \ + - set2 \ + '-s[spool package]:spool directory:_files -/' \ + '*:package instance:_pkg_instances --_opts spooled:set2--s' diff --git a/Completion/Solaris/Type/_pkg_instances b/Completion/Solaris/Type/_pkg_instances new file mode 100644 index 000000000..3f4c49219 --- /dev/null +++ b/Completion/Solaris/Type/_pkg_instances @@ -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 |
