zsh-workers
 help / color / mirror / code / Atom feed
035614b59c90533994b8d6ff63aeee44133f6002 blob 449 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
 
#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 "$@"
debug log:

solving 035614b ...
found 035614b 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).