zsh-workers
 help / color / mirror / code / Atom feed
7c148fad4a3778c47a2096398f15d1acb56b716d blob 1029 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 
#compdef svcs

_svcs() {
	local -a cols

	cols=(
		ctid\:"Contract ID" desc\:"Description" fmri\:"FMRI"
		inst\:"Instance name" nsta\:"Next state (abbr)" nstate\:"Next state"
		scope\:"Scope name" svc\:"Service name" sta\:"State (abbr)"
		state\:"State" stime\:"Start time"
	)

	_arguments -s \
		'(-l -x -d -D)-a[list all instances]' \
		'(-l -x -D -a -R)-d[list dependencies]' \
		'(-l -x -d -a -R)-D[list dependents]' \
		'(-l -x)-H[suppress header line]' \
		'(-x -d -D -a -R -s)-l[print detailed status about services and instances]' \
		'(-l -x)-o[display specific columns]:column:_values -s , "column" ${^cols/\:/[}\]' \
		'(-l -x)-p[list processes]' \
		'(-l -x -d -D)-R[list services with the given restarter]:instance FMRI:_svcs_fmri -i' \
		'(-l -x)-s[sort by a column]:column:(($cols))' \
		'(-l -x)-S[reverse sort by a column]:column:(($cols))' \
		'-v[verbose columns]' \
		'(-l)-x[display explanation for service states]' \
		'(-l -x)-\?[print help]' \
		'*:FMRI or pattern:_svcs_fmri -i'
}

_svcs "$@"

# vi:tw=0
debug log:

solving 7c148fa ...
found 7c148fa in https://git.vuxu.org/mirror/zsh/

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).