Add auto-completion for puppet secret_agent:

Provides auto-complete options for puppet secret_agent sub-command.
This commit is contained in:
Mark Small 2014-05-05 22:56:57 +01:00
commit fd1cfa6432

View file

@ -462,6 +462,14 @@ _resource_type_arguments=(
'--terminus: TERMINUS The indirector terminus to use'
)
local -a _secret_agent_arguments
_secret_agent_arguments=(
'synchronize:Run secret_agent once'
'--render-as:FORMAT The rendering format to use'
'--verbose:Whether to log verbosely'
'--debug:Whether to log debug information'
)
__task_list ()
@ -967,6 +975,23 @@ __puppet-resource_type ()
esac
}
__puppet-secret_agent ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "gem subcommand" _secret_agent_arguments
return
;;
esac
}
local expl
@ -1136,6 +1161,11 @@ case $state in
(resource_type)
__puppet-resource_type
;;
# Display sub-commands for puppet secret_agent.
(secret_agent)
__puppet-secret_agent
;;
esac
;;
esac