summary refs log tree commit diff
path: root/Completion/Solaris/Command
diff options
context:
space:
mode:
authorOliver Kiddle <opk@zsh.org>2014-10-14 23:03:40 +0200
committerOliver Kiddle <opk@zsh.org>2014-10-14 23:04:45 +0200
commit13fc579343b24d298fb8905933b6000d7fcda114 (patch)
treecbc1000696357438714107635f93166bcab76d3a /Completion/Solaris/Command
parent66320ca93a717467a0ed0d34da4c06257953aa50 (diff)
downloadzsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.gz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.tar.xz
zsh-13fc579343b24d298fb8905933b6000d7fcda114.zip
33467: correct return status on functions and numerous other minor fixes
Diffstat (limited to 'Completion/Solaris/Command')
-rw-r--r--Completion/Solaris/Command/_ptree26
1 files changed, 5 insertions, 21 deletions
diff --git a/Completion/Solaris/Command/_ptree b/Completion/Solaris/Command/_ptree
index 035614b59..754979c37 100644
--- a/Completion/Solaris/Command/_ptree
+++ b/Completion/Solaris/Command/_ptree
@@ -1,23 +1,7 @@
 #compdef ptree
 
-_ptree() {
-	local curcontext="$curcontext" context state line ret=1
-	typeset -A opt_args
-
-	_arguments -s \
-		'-a[all processes]' \
-		'-c[show contract memberships]' \
-		'-z[show processes in zone]:zone:($(zoneadm list))' \
-		'*:pid or user:->pidoruser' && ret=0
-
-	if [[ $ret -ne 0 ]]; then
-		_alternative \
-			'users:logged-in user:compadd ${$(who -q)\:#(users=*|\#)}' \
-			'pids:pid:_pids'
-		ret=$?
-	fi
-
-	return $ret
-}
-
-_ptree "$@"
+_arguments -s \
+  '-a[all processes]' \
+  '-c[show contract memberships]' \
+  '-z[show processes in zone]:zone:_zones' \
+  '*: : _alternative "users:logged-in user:_users_on" "pids:pid:_pids"'