From 13c6d38e4b989a7185a161d3978dd5cfd3da143f Mon Sep 17 00:00:00 2001 From: Eric Cook Date: Wed, 6 May 2015 22:36:48 -0400 Subject: 35052: new BSD completions --- Completion/BSD/Command/_jexec | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 Completion/BSD/Command/_jexec (limited to 'Completion/BSD/Command/_jexec') 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 "$@" -- cgit 1.4.1