about summary refs log tree commit diff
path: root/Completion/Solaris/Command/_svcs
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2008-07-21 19:15:22 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2008-07-21 19:15:22 +0000
commit5b29fedad850299950195a1878fe4923778f9dcc (patch)
tree100a2decba0f1b6f8c4ed1b866bddd5f2ff57019 /Completion/Solaris/Command/_svcs
parent2d2d341161ca6699a6efd6981c3a9fd7fe52e6d6 (diff)
downloadzsh-5b29fedad850299950195a1878fe4923778f9dcc.tar.gz
zsh-5b29fedad850299950195a1878fe4923778f9dcc.tar.xz
zsh-5b29fedad850299950195a1878fe4923778f9dcc.zip
25324: Danek Duvall: some Solaris and more general completions
Diffstat (limited to 'Completion/Solaris/Command/_svcs')
-rw-r--r--Completion/Solaris/Command/_svcs32
1 files changed, 32 insertions, 0 deletions
diff --git a/Completion/Solaris/Command/_svcs b/Completion/Solaris/Command/_svcs
new file mode 100644
index 000000000..0fcad2628
--- /dev/null
+++ b/Completion/Solaris/Command/_svcs
@@ -0,0 +1,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]' \
+		'(-)-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))' \
+		'(-l)-v[verbose columns]' \
+		'(-l)-x[Display explanation for service states]' \
+		'(-l -x)-\?[Print help]' \
+		'*:FMRI or pattern:_svcs_fmri -i'
+}
+
+_svcs "$@"
+
+# vi:tw=0