Add auto-completion for puppet filebucket:

Provides auto-complete options for puppet filebucket sub-command.
This commit is contained in:
Mark Small 2014-05-05 20:20:29 +01:00
commit b7fddb6c28

View file

@ -247,6 +247,26 @@ _file_arguments=(
'--terminus: TERMINUS The indirector terminus to use'
)
local -a _filebucket_arguments
_filebucket_arguments=(
'-h:Print this help message'
'--help:Print this help message'
'-V:Print version information'
'--version:Print version information'
'-d:Enable full debugging'
'--debug:Enable full debugging'
'-v:Print extra information'
'--verbose:Print extra information'
'-l:Use the local filebucket'
'--local:Use the local filebucket'
'-r:Use a remote filebucket'
'--remote:Use a remote filebucket'
'-s:<server> The server to send the file to, instead of locally'
'-server:<server> The server to send the file to, instead of locally'
'-b:<directory> undocumented action'
'--bucket:<directory> undocumented action'
)
__task_list ()
{
@ -479,6 +499,23 @@ __puppet-file ()
esac
}
__puppet-filebucket ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "gem subcommand" _filebucket_arguments
return
;;
esac
}
local expl
@ -568,6 +605,11 @@ case $state in
(file)
__puppet-file
;;
# Display sub-commands for puppet file.
(filebucket)
__puppet-filebucket
;;
esac
;;
esac