diff options
author | Eric Cook <llua@gmx.com> | 2015-05-06 22:36:48 -0400 |
---|---|---|
committer | Peter Stephenson <pws@zsh.org> | 2015-05-07 09:47:48 +0100 |
commit | 13c6d38e4b989a7185a161d3978dd5cfd3da143f (patch) | |
tree | 9be0b09768443bd50bb6345944d9f01c766b909c /Completion/BSD/Command/_jexec | |
parent | aa34d2f1652f31940534864c1a8ef5404c004638 (diff) | |
download | zsh-13c6d38e4b989a7185a161d3978dd5cfd3da143f.tar.gz zsh-13c6d38e4b989a7185a161d3978dd5cfd3da143f.tar.xz zsh-13c6d38e4b989a7185a161d3978dd5cfd3da143f.zip |
35052: new BSD completions
Diffstat (limited to 'Completion/BSD/Command/_jexec')
-rw-r--r-- | Completion/BSD/Command/_jexec | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Completion/BSD/Command/_jexec b/Completion/BSD/Command/_jexec new file mode 100644 index 000000000..f065ea1e0 --- /dev/null +++ b/Completion/BSD/Command/_jexec @@ -0,0 +1,19 @@ +#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 "$@" |