diff options
Diffstat (limited to 'Completion/Solaris/Command')
-rw-r--r-- | Completion/Solaris/Command/_coreadm | 2 | ||||
-rw-r--r-- | Completion/Solaris/Command/_dhcpinfo | 58 | ||||
-rw-r--r-- | Completion/Solaris/Command/_dtrace | 187 | ||||
-rw-r--r-- | Completion/Solaris/Command/_inetadm | 22 | ||||
-rw-r--r-- | Completion/Solaris/Command/_pfexec | 12 | ||||
-rw-r--r-- | Completion/Solaris/Command/_prstat | 79 | ||||
-rw-r--r-- | Completion/Solaris/Command/_svcadm | 129 | ||||
-rw-r--r-- | Completion/Solaris/Command/_svcprop | 42 | ||||
-rw-r--r-- | Completion/Solaris/Command/_zlogin | 30 |
9 files changed, 324 insertions, 237 deletions
diff --git a/Completion/Solaris/Command/_coreadm b/Completion/Solaris/Command/_coreadm index 7262e6423..655b48e63 100644 --- a/Completion/Solaris/Command/_coreadm +++ b/Completion/Solaris/Command/_coreadm @@ -40,6 +40,6 @@ _arguments -s \ - set2 \ '-p[PID-specific per-process core file name pattern]:' \ '-P[PID-specific per-process core file content]:content:_values -s + "content" $content' \ - '*:pids:_pids' \ + '*:pid:_pids' \ - set3 \ '-u[update options from coreadm.conf]' diff --git a/Completion/Solaris/Command/_dhcpinfo b/Completion/Solaris/Command/_dhcpinfo index 079b6e6f6..1dac684af 100644 --- a/Completion/Solaris/Command/_dhcpinfo +++ b/Completion/Solaris/Command/_dhcpinfo @@ -1,36 +1,32 @@ #compdef dhcpinfo -_dhcpinfo() { - local -a mnemonics_v4 mnemonics_v6 +local -a mnemonics_v4 mnemonics_v6 - mnemonics_v4=( - Subnet UTCoffst Router Timeserv IEN116ns DNSserv Logserv - Cookie Lprserv Impress Resource Hostname Bootsize Dumpfile - DNSdmain Swapserv Rootpath ExtendP IpFwdF NLrouteF PFilter - MaxIpSiz IpTTL PathTO PathTbl MTU SameMtuF Broadcst - MaskDscF MaskSupF RDiscvyF RSolictS StaticRt TrailerF - ArpTimeO EthEncap TcpTTL TcpKaInt TcpKaGbF NISdmain - NISservs NTPservs NetBNms NetBDsts NetBNdT NetBScop - XFontSrv XDispMgr LeaseTim Message T1Time T2Time NW_dmain - NWIPOpts NIS+dom NIS+serv TFTPsrvN OptBootF MblIPAgt - OptBootF MblIPAgt SMTPserv POP3serv NNTPserv WWWservs - Fingersv IRCservs STservs STDAservs UserClas SLP_DA SLP_SS - AgentOpt FQDN PXEarch BootFile BootPath BootSrvA BootSrvN - EchoVC LeaseNeg - ) +mnemonics_v4=( + Subnet UTCoffst Router Timeserv IEN116ns DNSserv Logserv + Cookie Lprserv Impress Resource Hostname Bootsize Dumpfile + DNSdmain Swapserv Rootpath ExtendP IpFwdF NLrouteF PFilter + MaxIpSiz IpTTL PathTO PathTbl MTU SameMtuF Broadcst + MaskDscF MaskSupF RDiscvyF RSolictS StaticRt TrailerF + ArpTimeO EthEncap TcpTTL TcpKaInt TcpKaGbF NISdmain + NISservs NTPservs NetBNms NetBDsts NetBNdT NetBScop + XFontSrv XDispMgr LeaseTim Message T1Time T2Time NW_dmain + NWIPOpts NIS+dom NIS+serv TFTPsrvN OptBootF MblIPAgt + OptBootF MblIPAgt SMTPserv POP3serv NNTPserv WWWservs + Fingersv IRCservs STservs STDAservs UserClas SLP_DA SLP_SS + AgentOpt FQDN PXEarch BootFile BootPath BootSrvA BootSrvN + EchoVC LeaseNeg +) - mnemonics_v6=( - ClientID ServerID Preference Unicast UserClass VendorClass - SIPNames SIPAddresses DNSAddresses DNSSearch NISServers - NIS+Servers NISDomain NIS+Domain SNTPServers InfoRefresh - BCMCDomain BCMCAddresses - ) +mnemonics_v6=( + ClientID ServerID Preference Unicast UserClass VendorClass + SIPNames SIPAddresses DNSAddresses DNSSearch NISServers + NIS+Servers NISDomain NIS+Domain SNTPServers InfoRefresh + BCMCDomain BCMCAddresses +) - _arguments -A \ - '-c[]' \ - '-i[interface]:interface:' \ - '-n[maximum number of lines]:limit:' \ - ':DHCP Parameter:_values "DHCP Parameter" $mnemonics_v4' \ -} - -_dhcpinfo "$@" +_arguments -A "-*" \ + '-c[]' \ + '-i[interface]:interface' \ + '-n[maximum number of lines]:limit' \ + ':DHCP parameter:_values "DHCP parameter" $mnemonics_v4' diff --git a/Completion/Solaris/Command/_dtrace b/Completion/Solaris/Command/_dtrace index a095589eb..06e0dc4f6 100644 --- a/Completion/Solaris/Command/_dtrace +++ b/Completion/Solaris/Command/_dtrace @@ -1,41 +1,152 @@ #compdef dtrace -# Synced with Nevada build 160 man pages -_dtrace() { - _arguments -s \ - '-32[generate 32-bit D programs and ELF files]' \ - '-64[generate 64-bit D programs and ELF files]' \ - '-a[claim anonymous tracing state]' \ - '-A[generate driver.conf(4) directives for anonymous tracing]' \ - '-b[set trace buffer size]' \ - '-c[run specified command and exit upon its completion]' \ - '-C[run cpp(1) preprocessor on script files]' \ - '-D[define symbol when invoking preprocessor]' \ - '-e[exit after compiling request but prior to enabling probes]' \ - '-f[enable or list probes matching the specified function name]:function: ' \ - '-F[coalesce trace output by function]' \ - '-G[generate an ELF file containing embedded dtrace program]' \ - '-H[print included files when invoking preprocessor]' \ - '-h[Generate a header file]' \ - '-i[enable or list probes matching the specified probe id]' \ - '-I[add include directory to preprocessor search path]:include dir:_files -/' \ - '-L[Add directory to search path for DTrace libraries]:lib dir:_files -/' \ - '-l[list probes matching specified criteria]' \ - '-m[enable or list probes matching the specified module name]:module: ' \ - '-n[enable or list probes matching the specified probe name]:name: ' \ - '-o[set output file]:output file:_files' \ - '-p[grab specified process-ID and cache its symbol tables]:pid:_pids' \ - '-P[enable or list probes matching the specified provider name]:provider: ' \ - '-q[set quiet mode (only output explicitly traced data)]' \ - '-s[enable or list probes according to the specified D script]' \ - '-S[print D compiler intermediate code]' \ - '-U[undefine symbol when invoking preprocessor]' \ - '-v[set verbose mode (report program stability attributes)]' \ - '-V[report DTrace API version]' \ - '-w[permit destructive actions]' \ - '-x[enable or modify compiler and tracing options]' \ - '-X[specify ISO C conformance settings for preprocessor]:ISO C conformance:((a\:"ISO plus K&R extensions (default)" c\:"Strictly conformant ISO C" s\:"K&R C only" t\:"ISO plus K&R extensions"))' \ - '-Z[permit probe descriptions that match zero probes]' -} +local curcontext="$curcontext" ret=1 +local -a state line args xopts -_dtrace "$@" +case $OSTYPE in + ^darwin*) + args=( + '-32[generate 32-bit D programs and ELF files]' + '-64[generate 64-bit D programs and ELF files]' + '(-A -h -l -V)-G[generate an ELF file containing embedded dtrace program]' + '-X+[specify ISO C conformance settings for preprocessor]:ISO C conformance:((a\:"ISO plus K&R extensions (default)" c\:"Strictly conformant ISO C" s\:"K&R C only" t\:"ISO plus K&R extensions"))' + ) + xopts=( + 'errexit[exit on error with specified status code]::status [1]' + 'noresolve[do not perform user address symbol resolution]' + 'uresolve[specify resolution of user addresses]:how:(no symbol basename absolute)' + ) + ;; + darwin*) + args=( + '*-W[wait for the named process to launch]:name' + ) + xopts=( + 'amin[set minimum stability attributes]:attribute' + 'arch[set target data model]:arch' + 'argref[ignore additional positional command-line args]' + 'core[create core dump when exiting dtrace]' + 'cpp[run C preprocessor over D programs before compiling]' + 'cpphdrs[print each header file name used]' + 'ctypes[write all CTF definitions into a file]:file:_file' + 'debug[enable DTrace debug messages]' + 'define[add preprocessor define]:var[=val]' + 'disallow_dsym[do not use dSYM files]' + 'droptags[print drop tags to stderr]' + 'empty[allow empty D files]' + 'encoding[set encoding used for output]:encoding:(ascii utf8)' + 'errtags[prefix error message with error tags]' + 'evaltime[when to start instrumenting a new process]:when:(preinit postinit)' + 'incdir[add include file search directory]:directory:_files -/' + 'ireg[specify size of DIF integer register set]:size' + 'late[set whether references to dynamic translators are allowed]: :(dynamic static)' + 'libdir[add library search directory]:directory:_files -/' + 'mangled[show mangled symbols for C++/Swift probes]' + 'nolibs[do not include D system libraries]' + 'nojtanalysis[disable jump table analysis]' + 'noerror[do not show error messages]' + 'pgmax[set maximum number of processes DTrace can grab at the same time]:number' + 'preallocate[preallocate memory in dtrace before running the script]:size' + 'pspec[interpret ambiguous specifications as probe names]' + 'strip[strip non-loadable sections from D program]' + 'tree[show dtrace compiler parse tree at different stages]:bitmap:(1 2 4)' + 'tregs[specify size of DIF tuple register set]:size' + 'undef[add #undef into preprocessor predefines]:var name' + 'verbose[show D compiler intermediate code]' + 'version[request specific version of DTrace scripting language]:version' + 'zdefs[permit probe descriptions that match zero probes]' + 'buflimit[specify threshold percentage for early buffer switches]:percentage (1-99)' + 'temporal[whether to sort events in time order]:bool:(true false)' + 'stacksymbols[whether to symbolicate stack symbols]:bool:(true false)' + ) + ;; +esac + +xopts+=( + 'aggrate[rate of aggregation reading]:time' + 'aggsize[aggregation buffer size]:size' + 'ustackframes[number of user stack frames]:scalar' + 'bufpolicy[specify the buffer policy for the principal buffer]:policy:(fill switch ring)' + 'bufresize[buffer resizing policy]:policy:(auto manual)' + 'bufsize[size of the per-CPU principal buffer]:size' + 'cleanrate[cleaning rate (hz)]:time' + 'cpu[specify the CPU on which to enable tracing]:scalar' + 'defaultargs[allow references to unspecified macro arguments]' + 'destructive[allow destructive actions]' + 'dynvarsize[size of the dynamic variable space]:size' + 'flowindent[turn on flow indentation]' + 'grabanon[claim anonymous state]' + 'jstackframes[number of default stack frames for jstack()]:scalar' + 'jstackstrsize[default string space size for jstack()]:scalar' + 'nspec[number of speculations]:scalar' + 'quiet[set quiet mode]' + 'specsize[size of the speculation buffer]:size' + 'strsize[maximum size of strings]:size' + 'stackframes[maximum number of kernelspace stack frames to unwind for stack()]:scalar' + 'stackindent[whitespace characters to use when indenting stack() and ustack() output]:scalar' + 'statusrate[rate of status checking]:time' + 'switchrate[rate of buffer switching]:time' + 'ustackframes[maximum number of userspace stack frames to unwind for ustack()]:scalar' + 'agghist[whether to show histogram for all aggregations]:bool:(true false)' + 'aggpack[pack aggregations together]' + 'aggsortkey[sort aggregation by key]' + 'aggsortkeypos[position of aggregate key used for sorting]:position' + 'aggsortpos[position of the aggregate variable used for sorting]:position' + 'aggsortrev[sort aggregations in reverse order]' + 'aggzoom[zoom aggregation histogram to the maximum value]' + 'rawbytes[always print tracemem output in hexadecimal]' +) + +_arguments -C -s $args \ + '-a[claim anonymous tracing state]' \ + '(-G -h -l -V)-A[generate driver.conf(4) directives for anonymous tracing]' \ + '-b+[set trace buffer size]:size' \ + '*-c+[run specified command and exit upon its completion]:command' \ + '-C[run cpp(1) preprocessor on script files]' \ + '*-D+[define symbol when invoking preprocessor]:name' \ + '-e[exit after compiling request but prior to enabling probes]' \ + '-f+[enable or list probes matching the specified function name]:function:->functions' \ + '-F[coalesce trace output by function]' \ + '-H[print included files when invoking preprocessor]' \ + '(-A -G -l -V)-h[generate a header file]' \ + '*-i+[enable or list probes matching the specified probe id]:probe-id' \ + '-I+[add include directory to preprocessor search path]:path:_directories' \ + '(-A -G -h -V)-l[list probes instead of enabling them]' \ + '-L+[add directory to search path for DTrace libraries]:path:_directories' \ + '*-m+[trace or list probes matching the specified module name]:module:->modules' \ + '*-n+[trace or list probes matching the specified probe name]:name:->probes' \ + '-o+[set output file]:output file:_files' \ + '-p+[grab specified process-ID and cache its symbol tables]:pid:_pids' \ + '*-P+[trace or list probes matching the specified provider name]:provider:->providers' \ + '-q[set quiet mode (only output explicitly traced data)]' \ + '*-s+[enable or list probes according to the specified D script]:script file:_files' \ + '-S[print D compiler intermediate code]' \ + '*-U+[undefine symbol when invoking preprocessor]:name' \ + '-v[set verbose mode (report program stability attributes)]' \ + '(-A -G -h -l)-V[report DTrace API version]' \ + '-w[permit destructive actions]' \ + '*-x+[enable or modify compiler and tracing options]: : _values option $xopts' \ + '-Z[permit probe descriptions that match zero probes]' && return + +if [[ -n $state ]]; then + local -a fields=( providers modules functions probes ) + local -a suf=( : : : ) + typeset -ga _cache_dtrace_probes + (( $#_cache_dtrace_probes )) || _cache_dtrace_probes=( + ${${${${(f)"$(_call_program dtrace-probes dtrace -l)"}[2,-1]}:#*[:[#]*}/(#b) #<-> #([^ ]#) #([^ ]#) #([^ ]#) ##([^ ]##)/${match[1]}:${match[3]:+$match[2]}:${match[3]:-$match[2]}:$match[4]} + ) # filtering out those containing : and [, they occur on macos but may just be unmangled forms and not directly usable + suf[${fields[(i)$state]}]=( "${compstate[quote][-1]} " ) # field matching the state gets a space suffix + while compset -P 1 '*:'; do + shift fields # each already listed field reduces one being possible + done + _tags dtrace-${^fields[1,(r)$state]} + while _tags; do + _requested dtrace-probes expl 'probe name' compadd -S "$suf[4]" - ${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#(#e)}##*:} && ret=0 + _requested dtrace-functions expl 'function' compadd -S "$suf[3]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#(#e)}%:*}##*:} && ret=0 + _requested dtrace-modules expl 'module' compadd -S "$suf[2]" - ${${${(M)_cache_dtrace_probes:#((#s)|*:)${IPREFIX}[^:]#:[^:]#:[^:]#(#e)}#*:}%%:*} && ret=0 + _requested dtrace-providers expl 'provider' compadd -S "$suf[1]" - ${_cache_dtrace_probes%%:*} && ret=0 + (( ret )) || return 0 + done +fi + +return 1 diff --git a/Completion/Solaris/Command/_inetadm b/Completion/Solaris/Command/_inetadm index 0c8b14a4e..527cc5a71 100644 --- a/Completion/Solaris/Command/_inetadm +++ b/Completion/Solaris/Command/_inetadm @@ -1,16 +1,10 @@ #compdef inetadm -_inetadm() { - _arguments -s \ - '-?[help]' \ - '-l[list service instance properties]:FMRI:_svcs_fmri -i' \ - '-e[enable specified instance]:FMRI:_svcs_fmri -i' \ - '-d[disable specified instance]:FMRI:_svcs_fmri -i' \ - '-p[list inet service properties]' \ - '-m[modify service instance properties]:FMRI:_svcs_fmri -i' \ - '-M[modify inet service properties]' -} - -_inetadm "$@" - -# vi:tw=0 +_arguments -s \ + '-?[help]' \ + '-l[list service instance properties]:FMRI:_svcs_fmri -i' \ + '-e[enable specified instance]:FMRI:_svcs_fmri -i' \ + '-d[disable specified instance]:FMRI:_svcs_fmri -i' \ + '-p[list inet service properties]' \ + '-m[modify service instance properties]:FMRI:_svcs_fmri -i' \ + '-M[modify inet service properties]' diff --git a/Completion/Solaris/Command/_pfexec b/Completion/Solaris/Command/_pfexec index 2519c3cdc..e90f33222 100644 --- a/Completion/Solaris/Command/_pfexec +++ b/Completion/Solaris/Command/_pfexec @@ -22,11 +22,15 @@ _privset() { } _pfexec() { + local cmd cpp local -a _comp_priv_prefix - _arguments \ - '-P[privileges to acquire]:privspec:_privset' \ - '(-):command name: _command_names -e' \ - '*::arguments:{ _comp_priv_prefix=( pfexec ${(kv)opt_args[-P]} ) ; _normal }' + local -A opt_args + cmd="$words[1]" + cpp='_comp_priv_prefix=( $cmd ${(kv)opt_args[(I)-P]} )' + _arguments \ + '-P+[privileges to acquire]:privspec:_privset' \ + "(-): :{ $cpp; _command_names -e }" \ + "*:: :{ $cpp; _normal }" } _pfexec "$@" diff --git a/Completion/Solaris/Command/_prstat b/Completion/Solaris/Command/_prstat index 1eb38845c..a95919127 100644 --- a/Completion/Solaris/Command/_prstat +++ b/Completion/Solaris/Command/_prstat @@ -1,46 +1,41 @@ #compdef prstat -_prstat() -{ - local d_opt sort_key - d_opt=( - "u"\:"seconds past the epoch" - "d"\:"standard date format" - ) +local d_opt sort_key +d_opt=( + "u"\:"seconds past the epoch" + "d"\:"standard date format" +) - sort_key=( - "cpu"\:"process CPU usage (default)" - "pri"\:"process priority" - "rss"\:"resident set size" - "size"\:"size of process image" - "time"\:"process execution time" - ) +sort_key=( + "cpu"\:"process CPU usage" + "pri"\:"process priority" + "rss"\:"resident set size" + "size"\:"size of process image" + "time"\:"process execution time" +) - _arguments -A "-*" \ - '-a[information about processes and users]' \ - '-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:' \ - '-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[information about home lgroup]' \ - '-j[only processes or lwps whose project ID is in the given list]:project list:' \ - '-J[information about processes and projects]' \ - '-k[only processes or lwps whose task ID is in tasklist]:task list'\ - '-L[statistics for each light-weight process (LWP)]' \ - '-m[microstate process accounting information]' \ - '-n[restrict number of output lines]:ntop,[nbottom]' \ - '-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' \ - '-R[Put prstat in the real time scheduling class]' \ - '-s[Sort key (descending)]:key:(($sort_key))' \ - '-S[Sort key (ascending)]:key:(($sort_key))' \ - '-t[total usage summary for each user]' \ - '-T[information about processes and tasks]' \ - '-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' \ - '-v[verbose process usage]' \ - '-z[only processes or LWPs whose zone ID is in the list]:zone ID:' \ - '-Z[information about processes and zones]' -} - -_prstat "$@" +_arguments -A "-*" \ + '-a[information about processes and users]' \ + '-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' \ + '-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[information about home lgroup]' \ + '-j[only processes or lwps whose project ID is in the given list]:project list' \ + '-J[information about processes and projects]' \ + '-k[only processes or lwps whose task ID is in tasklist]:task list'\ + '-L[statistics for each light-weight process (LWP)]' \ + '-m[microstate process accounting information]' \ + '-n[restrict number of output lines]:ntop,[nbottom]' \ + '-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' \ + '-R[put prstat in the real time scheduling class]' \ + '-s[sort key (descending)]:sort key [cpu]:(($sort_key))' \ + '-S[sort key (ascending)]:sort key [cpu]:(($sort_key))' \ + '-t[total usage summary for each user]' \ + '-T[information about processes and tasks]' \ + '-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' \ + '-v[verbose process usage]' \ + '-z[only processes or LWPs whose zone ID is in the list]:zone ID' \ + '-Z[information about processes and zones]' diff --git a/Completion/Solaris/Command/_svcadm b/Completion/Solaris/Command/_svcadm index c9826f2eb..22780d03f 100644 --- a/Completion/Solaris/Command/_svcadm +++ b/Completion/Solaris/Command/_svcadm @@ -1,78 +1,75 @@ #compdef svcadm -_svcadm() { - local curcontext="$curcontext" state line expl subcmds - typeset -A opt_args +local curcontext="$curcontext" state line expl subcmds +typeset -A opt_args - subcmds=( enable disable restart refresh mark delegate clear milestone ) +subcmds=( enable disable restart refresh mark delegate clear milestone ) - if [[ $service == "svcadm" ]]; then - _arguments -C -A "-*" \ - '-v[Print actions verbosely]' \ - '*::command:->subcmd' && return 0 +if [[ $service == "svcadm" ]]; then + _arguments -C -A "-*" \ + '-v[print actions verbosely]' \ + '*::command:->subcmd' && return 0 - if (( CURRENT == 1 )); then - _wanted commands expl 'svcadm subcommand' compadd -a subcmds - return - fi - service="$words[1]" - curcontext="${curcontext%:*}=$service:" - fi + if (( CURRENT == 1 )); then + _wanted commands expl 'svcadm subcommand' compadd -a subcmds + return + fi + service="$words[1]" + curcontext="${curcontext%:*}-$service:" +fi - case $service in - (enable) - _arguments -A "-*" \ - '-r[Recursively enable dependencies]' \ - '-s[Wait for service to come online]' \ - '-T[Timeout for -s]:seconds:' \ - '-t[State change is temporary]' \ - '*:instance FMRI:_svcs_fmri -i' - ;; +case $service in + (enable) + _arguments -A "-*" \ + '-r[recursively enable dependencies]' \ + '-s[wait for service to come online]' \ + '-T[timeout for -s]:timeout (seconds)' \ + '-t[state change is temporary]' \ + '*:instance FMRI:_svcs_fmri -i' + ;; - (disable) - _arguments -A "-*" \ - '-s[Wait for service to become disabled]' \ - '-T[Timeout for -s]:seconds:' \ - '-t[State change is temporary]' \ - '*:instance FMRI:_svcs_fmri -i' - ;; + (disable) + _arguments -A "-*" \ + '-s[wait for service to become disabled]' \ + '-T[timeout for -s]:timeout (seconds)' \ + '-t[state change is temporary]' \ + '*:instance FMRI:_svcs_fmri -i' + ;; - (mark) - _arguments -A "-*" \ - '-I[Change state immediately]' \ - "-s[Wait for service to reach the new state]" \ - '-T[Timeout for -s]:seconds:' \ - '-t[State change is temporary]' \ - ':state:(degraded maintenance)' \ - ':instance FMRI:_svcs_fmri -i' - ;; + (mark) + _arguments -A "-*" \ + '-I[change state immediately]' \ + "-s[wait for service to reach the new state]" \ + '-T[timeout for -s]:timeout (seconds)' \ + '-t[state change is temporary]' \ + ':state:(degraded maintenance)' \ + ':instance FMRI:_svcs_fmri -i' + ;; - (restart|refresh|clear) - _arguments \ - "-s[Wait for service to $service]" \ - '-T[Timeout for -s]:seconds:' \ - '*:instance FMRI:_svcs_fmri -i' - ;; + (restart|refresh|clear) + _arguments \ + "-s[wait for service to $service]" \ + '-T[timeout for -s]:timeout (seconds)' \ + '*:instance FMRI:_svcs_fmri -i' + ;; - (delegate) - _arguments -A "-*" \ - '-s[Wait for instances to come online]' \ - '-T[Timeout for -s]:seconds:' \ - ':restarter FMRI:_svcs_fmri -r' \ - '*:FMRI:_svcs_fmri -i' - ;; + (delegate) + _arguments -A "-*" \ + '-s[wait for instances to come online]' \ + '-T[timeout for -s]:timeout (seconds)' \ + ':restarter FMRI:_svcs_fmri -r' \ + '*:FMRI:_svcs_fmri -i' + ;; - (milestone) - _arguments -A "-*" \ - '-d[Make milestone the default]' \ - '-s[Wait for the transition to the new milestone]' \ - '-T[Timeout for -s]:seconds:' \ - '*:milestone FMRI:_svcs_fmri -m' - ;; + (milestone) + _arguments -A "-*" \ + '-d[make milestone the default]' \ + '-s[wait for the transition to the new milestone]' \ + '-T[timeout for -s]:timeout (seconds)' \ + '*:milestone FMRI:_svcs_fmri -m' + ;; - (*) - _message "unknown svcadm subcommand: $service" - esac -} - -_svcadm "$@" + (*) + _message "unknown svcadm subcommand: $service" + ;; +esac diff --git a/Completion/Solaris/Command/_svcprop b/Completion/Solaris/Command/_svcprop index 4a5436caf..19c65d3cf 100644 --- a/Completion/Solaris/Command/_svcprop +++ b/Completion/Solaris/Command/_svcprop @@ -1,26 +1,20 @@ #compdef svcprop -_svcprop() { - _arguments -s \ - '-f[designate properties by their FMRI]' \ - '-q[quiet]' \ - '-t[use multi-property output format]' \ - '-v[verbose]' \ - - set1 \ - '-w[waits for the selected property or property group to change]' \ - '-p[prints values of named property or property group]' \ - ':FMRI:_svcs_fmri -i' \ - - set2 \ - '-a[display all properties]' \ - '-g[group type filter]:group type:' \ - '*-l[properties from a layer]:layer:(admin site-profile system-profile manifest)' \ - '(-c -s)-C[retrieve properties without composition]' \ - '(-C -s)-c[retrieve properties with composition]' \ - '(-c -C)-s[retrieve properties from snapshot]:snapshot:' \ - '*-p[prints values of named property or property group]' \ - '*:FMRI:_svcs_fmri -i' -} - -_svcprop "$@" - -# vi:tw=0 +_arguments -s \ + '-f[designate properties by their FMRI]' \ + '-q[quiet]' \ + '-t[use multi-property output format]' \ + '-v[verbose]' \ + - set1 \ + '-w[wait for the selected property or property group to change]' \ + '-p[print values of named property or property group]' \ + ':FMRI:_svcs_fmri -i' \ + - set2 \ + '-a[display all properties]' \ + '-g[group type filter]:group type' \ + '*-l[properties from a layer]:layer:(admin site-profile system-profile manifest)' \ + '(-c -s)-C[retrieve properties without composition]' \ + '(-C -s)-c[retrieve properties with composition]' \ + '(-c -C)-s[retrieve properties from snapshot]:snapshot' \ + '*-p[print values of named property or property group]' \ + '*:FMRI:_svcs_fmri -i' diff --git a/Completion/Solaris/Command/_zlogin b/Completion/Solaris/Command/_zlogin index 74cbafe82..142114302 100644 --- a/Completion/Solaris/Command/_zlogin +++ b/Completion/Solaris/Command/_zlogin @@ -1,20 +1,16 @@ #compdef zlogin # Synced with the Nevada build 162 man page -_zlogin() { - local -a _comp_priv_prefix - _arguments -s \ - '-E[Disable escape character]' \ - '-e[Specify escape character]:character:' \ - '-l[Specify username]:username:_users' \ - ':zonename:_zones' \ - - set1 \ - '-C[Connect to zone console]' \ - '-d[Disconnect on zone halt]' \ - - set2 \ - '-S["Safe" login mode]' \ - '(-):command name: _command_names -e' \ - '*::utility: _normal' -} - -_zlogin "$@" +local -a _comp_priv_prefix +_arguments -s \ + '-E[disable escape character]' \ + '-e[specify escape character]:character' \ + '-l[specify username]:username:_users' \ + ':zonename:_zones' \ + - set1 \ + '-C[connect to zone console]' \ + '-d[disconnect on zone halt]' \ + - set2 \ + '-S["safe" login mode]' \ + '(-):command name: _command_names -e' \ + '*::utility: _normal' |