1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-08 12:01:21 +02:00

49158: remove superfluous function definitions

This commit is contained in:
Oliver Kiddle 2021-07-11 00:32:34 +02:00
parent e9203d04aa
commit 6e10067ffd
10 changed files with 223 additions and 253 deletions

View file

@ -1,5 +1,15 @@
2021-07-10 Oliver Kiddle <opk@zsh.org> 2021-07-10 Oliver Kiddle <opk@zsh.org>
* 49158: Completion/Debian/Command/_dscverify,
Completion/Solaris/Command/_dhcpinfo,
Completion/Solaris/Command/_inetadm,
Completion/Solaris/Command/_prstat,
Completion/Solaris/Command/_svcadm,
Completion/Solaris/Command/_svcprop,
Completion/Solaris/Command/_zlogin,
Completion/Unix/Command/_pkginfo, Completion/Unix/Command/_pkgrm:
remove superfluous function definitions
* 49157: Completion/Linux/Command/_valgrind, * 49157: Completion/Linux/Command/_valgrind,
Completion/Unix/Command/_baz, Completion/Unix/Command/_opustools, Completion/Unix/Command/_baz, Completion/Unix/Command/_opustools,
Completion/Unix/Command/_tla: fix uses of literal % characters in Completion/Unix/Command/_tla: fix uses of literal % characters in

View file

@ -4,19 +4,18 @@
# This is dscverify, from the Debian devscripts package, version 2.20.2 # This is dscverify, from the Debian devscripts package, version 2.20.2
# ... # ...
_dscverify() {
local all_opts=( local all_opts=(
'--help[show the help message and exit]' '--help[show the help message and exit]'
'--version[show the version + copyright and exit]' '--version[show the version + copyright and exit]'
'--no-default-keyrings[do not check against the default keyrings]' '--no-default-keyrings[do not check against the default keyrings]'
'*--keyring[add keyring to the list of keyrings used]:keyring:_files -g "*.(kbx|gpg)(-.)"' '*--keyring[add keyring to the list of keyrings used]:keyring:_files -g "*.(kbx|gpg)(-.)"'
'(--nosigcheck --no-sig-check -u)'{--nosigcheck,--no-sig-check,-u}'[do not verify the GPG signature]' '(--nosigcheck --no-sig-check -u)'{--nosigcheck,--no-sig-check,-u}"[don't verify the GPG signature]"
'--verbose[do not suppress GPG output]' "--verbose[don't suppress GPG output]"
'*:dsc file:_files -g "*.(changes|dsc|buildinfo)(-.)"' '*:dsc file:_files -g "*.(changes|dsc|buildinfo)(-.)"'
) )
local first_only=( local first_only=(
'(--no-conf --noconf)'{--no-conf,--noconf}'[do not read the devscripts config file]' '(--no-conf --noconf)'{--no-conf,--noconf}"[don't read the devscripts config file]"
) )
if (( CURRENT == 2 )); then if (( CURRENT == 2 )); then
@ -25,6 +24,3 @@ _dscverify() {
_arguments \ _arguments \
"$all_opts[@]" "$all_opts[@]"
}
_dscverify "$@"

View file

@ -1,6 +1,5 @@
#compdef dhcpinfo #compdef dhcpinfo
_dhcpinfo() {
local -a mnemonics_v4 mnemonics_v6 local -a mnemonics_v4 mnemonics_v6
mnemonics_v4=( mnemonics_v4=(
@ -26,11 +25,8 @@ _dhcpinfo() {
BCMCDomain BCMCAddresses BCMCDomain BCMCAddresses
) )
_arguments -A \ _arguments -A "-*" \
'-c[]' \ '-c[]' \
'-i[interface]:interface:' \ '-i[interface]:interface' \
'-n[maximum number of lines]:limit:' \ '-n[maximum number of lines]:limit' \
':DHCP Parameter:_values "DHCP Parameter" $mnemonics_v4' \ ':DHCP parameter:_values "DHCP parameter" $mnemonics_v4'
}
_dhcpinfo "$@"

View file

@ -1,6 +1,5 @@
#compdef inetadm #compdef inetadm
_inetadm() {
_arguments -s \ _arguments -s \
'-?[help]' \ '-?[help]' \
'-l[list service instance properties]:FMRI:_svcs_fmri -i' \ '-l[list service instance properties]:FMRI:_svcs_fmri -i' \
@ -9,8 +8,3 @@ _inetadm() {
'-p[list inet service properties]' \ '-p[list inet service properties]' \
'-m[modify service instance properties]:FMRI:_svcs_fmri -i' \ '-m[modify service instance properties]:FMRI:_svcs_fmri -i' \
'-M[modify inet service properties]' '-M[modify inet service properties]'
}
_inetadm "$@"
# vi:tw=0

View file

@ -1,7 +1,5 @@
#compdef prstat #compdef prstat
_prstat()
{
local d_opt sort_key local d_opt sort_key
d_opt=( d_opt=(
"u"\:"seconds past the epoch" "u"\:"seconds past the epoch"
@ -19,11 +17,11 @@ _prstat()
_arguments -A "-*" \ _arguments -A "-*" \
'-a[information about processes and users]' \ '-a[information about processes and users]' \
'-c[new reports below previous reports instead of overprinting them]' \ '-c[new reports below previous reports instead of overprinting them]' \
'-C[processes or lwps that are bound to processor sets in the list]:processor set list:' \ '-C[processes or lwps that are bound to processor sets in the list]:processor set list' \
'-d[specify the representation of time]:time representation:(($d_opt))' \ '-d[specify the representation of time]:time representation:(($d_opt))' \
'-h[only processes or lwps whose home lgroup is in the list]:lgroup list:' \ '-h[only processes or lwps whose home lgroup is in the list]:lgroup list' \
'-H[information about home lgroup]' \ '-H[information about home lgroup]' \
'-j[only processes or lwps whose project ID is in the given list]:project list:' \ '-j[only processes or lwps whose project ID is in the given list]:project list' \
'-J[information about processes and projects]' \ '-J[information about processes and projects]' \
'-k[only processes or lwps whose task ID is in tasklist]:task list'\ '-k[only processes or lwps whose task ID is in tasklist]:task list'\
'-L[statistics for each light-weight process (LWP)]' \ '-L[statistics for each light-weight process (LWP)]' \
@ -31,7 +29,7 @@ _prstat()
'-n[restrict number of output lines]:ntop,[nbottom]' \ '-n[restrict number of output lines]:ntop,[nbottom]' \
'-p[only processes whose process ID is in the list]:PID list' \ '-p[only processes whose process ID is in the list]:PID list' \
'-P[only processes or lwps which have most recently executed on a CPU in the list]:CPU list' \ '-P[only processes or lwps which have most recently executed on a CPU in the list]:CPU list' \
'-R[Put prstat in the real time scheduling class]' \ '-R[put prstat in the real time scheduling class]' \
'-s[sort key (descending)]:sort key [cpu]:(($sort_key))' \ '-s[sort key (descending)]:sort key [cpu]:(($sort_key))' \
'-S[sort key (ascending)]:sort key [cpu]:(($sort_key))' \ '-S[sort key (ascending)]:sort key [cpu]:(($sort_key))' \
'-t[total usage summary for each user]' \ '-t[total usage summary for each user]' \
@ -39,8 +37,5 @@ _prstat()
'-u[only processes whose effective user ID is in the list]:UID:_users' \ '-u[only processes whose effective user ID is in the list]:UID:_users' \
'-U[only processes whose real user ID is in the list]:UID:_users' \ '-U[only processes whose real user ID is in the list]:UID:_users' \
'-v[verbose process usage]' \ '-v[verbose process usage]' \
'-z[only processes or LWPs whose zone ID is in the list]:zone ID:' \ '-z[only processes or LWPs whose zone ID is in the list]:zone ID' \
'-Z[information about processes and zones]' '-Z[information about processes and zones]'
}
_prstat "$@"

View file

@ -1,6 +1,5 @@
#compdef svcadm #compdef svcadm
_svcadm() {
local curcontext="$curcontext" state line expl subcmds local curcontext="$curcontext" state line expl subcmds
typeset -A opt_args typeset -A opt_args
@ -8,7 +7,7 @@ _svcadm() {
if [[ $service == "svcadm" ]]; then if [[ $service == "svcadm" ]]; then
_arguments -C -A "-*" \ _arguments -C -A "-*" \
'-v[Print actions verbosely]' \ '-v[print actions verbosely]' \
'*::command:->subcmd' && return 0 '*::command:->subcmd' && return 0
if (( CURRENT == 1 )); then if (( CURRENT == 1 )); then
@ -16,63 +15,61 @@ _svcadm() {
return return
fi fi
service="$words[1]" service="$words[1]"
curcontext="${curcontext%:*}=$service:" curcontext="${curcontext%:*}-$service:"
fi fi
case $service in case $service in
(enable) (enable)
_arguments -A "-*" \ _arguments -A "-*" \
'-r[Recursively enable dependencies]' \ '-r[recursively enable dependencies]' \
'-s[Wait for service to come online]' \ '-s[wait for service to come online]' \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
'-t[State change is temporary]' \ '-t[state change is temporary]' \
'*:instance FMRI:_svcs_fmri -i' '*:instance FMRI:_svcs_fmri -i'
;; ;;
(disable) (disable)
_arguments -A "-*" \ _arguments -A "-*" \
'-s[Wait for service to become disabled]' \ '-s[wait for service to become disabled]' \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
'-t[State change is temporary]' \ '-t[state change is temporary]' \
'*:instance FMRI:_svcs_fmri -i' '*:instance FMRI:_svcs_fmri -i'
;; ;;
(mark) (mark)
_arguments -A "-*" \ _arguments -A "-*" \
'-I[Change state immediately]' \ '-I[change state immediately]' \
"-s[Wait for service to reach the new state]" \ "-s[wait for service to reach the new state]" \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
'-t[State change is temporary]' \ '-t[state change is temporary]' \
':state:(degraded maintenance)' \ ':state:(degraded maintenance)' \
':instance FMRI:_svcs_fmri -i' ':instance FMRI:_svcs_fmri -i'
;; ;;
(restart|refresh|clear) (restart|refresh|clear)
_arguments \ _arguments \
"-s[Wait for service to $service]" \ "-s[wait for service to $service]" \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
'*:instance FMRI:_svcs_fmri -i' '*:instance FMRI:_svcs_fmri -i'
;; ;;
(delegate) (delegate)
_arguments -A "-*" \ _arguments -A "-*" \
'-s[Wait for instances to come online]' \ '-s[wait for instances to come online]' \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
':restarter FMRI:_svcs_fmri -r' \ ':restarter FMRI:_svcs_fmri -r' \
'*:FMRI:_svcs_fmri -i' '*:FMRI:_svcs_fmri -i'
;; ;;
(milestone) (milestone)
_arguments -A "-*" \ _arguments -A "-*" \
'-d[Make milestone the default]' \ '-d[make milestone the default]' \
'-s[Wait for the transition to the new milestone]' \ '-s[wait for the transition to the new milestone]' \
'-T[Timeout for -s]:seconds:' \ '-T[timeout for -s]:timeout (seconds)' \
'*:milestone FMRI:_svcs_fmri -m' '*:milestone FMRI:_svcs_fmri -m'
;; ;;
(*) (*)
_message "unknown svcadm subcommand: $service" _message "unknown svcadm subcommand: $service"
;;
esac esac
}
_svcadm "$@"

View file

@ -1,26 +1,20 @@
#compdef svcprop #compdef svcprop
_svcprop() {
_arguments -s \ _arguments -s \
'-f[designate properties by their FMRI]' \ '-f[designate properties by their FMRI]' \
'-q[quiet]' \ '-q[quiet]' \
'-t[use multi-property output format]' \ '-t[use multi-property output format]' \
'-v[verbose]' \ '-v[verbose]' \
- set1 \ - set1 \
'-w[waits for the selected property or property group to change]' \ '-w[wait for the selected property or property group to change]' \
'-p[prints values of named property or property group]' \ '-p[print values of named property or property group]' \
':FMRI:_svcs_fmri -i' \ ':FMRI:_svcs_fmri -i' \
- set2 \ - set2 \
'-a[display all properties]' \ '-a[display all properties]' \
'-g[group type filter]:group type:' \ '-g[group type filter]:group type' \
'*-l[properties from a layer]:layer:(admin site-profile system-profile manifest)' \ '*-l[properties from a layer]:layer:(admin site-profile system-profile manifest)' \
'(-c -s)-C[retrieve properties without composition]' \ '(-c -s)-C[retrieve properties without composition]' \
'(-C -s)-c[retrieve properties with composition]' \ '(-C -s)-c[retrieve properties with composition]' \
'(-c -C)-s[retrieve properties from snapshot]:snapshot:' \ '(-c -C)-s[retrieve properties from snapshot]:snapshot' \
'*-p[prints values of named property or property group]' \ '*-p[print values of named property or property group]' \
'*:FMRI:_svcs_fmri -i' '*:FMRI:_svcs_fmri -i'
}
_svcprop "$@"
# vi:tw=0

View file

@ -1,20 +1,16 @@
#compdef zlogin #compdef zlogin
# Synced with the Nevada build 162 man page # Synced with the Nevada build 162 man page
_zlogin() {
local -a _comp_priv_prefix local -a _comp_priv_prefix
_arguments -s \ _arguments -s \
'-E[Disable escape character]' \ '-E[disable escape character]' \
'-e[Specify escape character]:character:' \ '-e[specify escape character]:character' \
'-l[Specify username]:username:_users' \ '-l[specify username]:username:_users' \
':zonename:_zones' \ ':zonename:_zones' \
- set1 \ - set1 \
'-C[Connect to zone console]' \ '-C[connect to zone console]' \
'-d[Disconnect on zone halt]' \ '-d[disconnect on zone halt]' \
- set2 \ - set2 \
'-S["Safe" login mode]' \ '-S["safe" login mode]' \
'(-):command name: _command_names -e' \ '(-):command name: _command_names -e' \
'*::utility: _normal' '*::utility: _normal'
}
_zlogin "$@"

View file

@ -1,14 +1,13 @@
#compdef pkginfo #compdef pkginfo
_pkginfo() {
_arguments -s \ _arguments -s \
'(-q -r -x)-l[long listing]' \ '(-q -r -x)-l[long listing]' \
'(-l -r -x)-q[quiet mode]' \ '(-l -r -x)-q[quiet mode]' \
'(-l -q -x)-r[relocation base]' \ '(-l -q -x)-r[relocation base]' \
'(-l -q -r)-x[extracted listing]' \ '(-l -q -r)-x[extracted listing]' \
'-c[category]:category: ' \ '-c[category]:category' \
'-a[architecture]:architecture: ' \ '-a[architecture]:architecture' \
'-v[version]:version: ' \ '-v[version]:version' \
- set1 \ - set1 \
'(-p)-i[select completely installed packages]' \ '(-p)-i[select completely installed packages]' \
'(-i)-p[select partially installed packages]' \ '(-i)-p[select partially installed packages]' \
@ -17,6 +16,3 @@ _pkginfo() {
- set2 \ - set2 \
'-d[device]:device file:_files' \ '-d[device]:device file:_files' \
'*:package instance:_pkg_instance --_opts uninstalled:set2--d' '*:package instance:_pkg_instance --_opts uninstalled:set2--d'
}
_pkginfo "$@"

View file

@ -1,8 +1,7 @@
#compdef pkgrm #compdef pkgrm
_pkgrm() {
_arguments -s \ _arguments -s \
'-Y[select packages by category]:category: ' \ '-Y[select packages by category]:category' \
- set1 \ - set1 \
'-n[non-interactive mode]' \ '-n[non-interactive mode]' \
'-v[trace all scripts]' \ '-v[trace all scripts]' \
@ -15,6 +14,3 @@ _pkgrm() {
- set2 \ - set2 \
'-s[spool package]:spool directory:_files -/' \ '-s[spool package]:spool directory:_files -/' \
'*:package instance:_pkg_instance --_opts spooled:set2--s' '*:package instance:_pkg_instance --_opts spooled:set2--s'
}
_pkgrm "$@"