1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-17 00:31:09 +02:00
zsh/Completion/BSD/Command/_jexec
2015-05-07 09:47:48 +01:00

19 lines
460 B
Text

#compdef jexec
_jexec_normal() {
local PATH=$PATH
# relative paths are relative to the jail's root
path=( "$(command jls -j $words[1] path)"/$^path )
shift 1 words; (( CURRENT-- ))
_normal
}
_jexec() {
_arguments -s -w -A "-*" : \
'(-U)-u[host environment user whom command runs as]:host user:_users' \
'(-u)-U[jail environment user whom command runs as]:jail user:_users' \
'1:jail:_jails' \
'*:: : _jexec_normal'
}
_jexec "$@"