Add auto-completion for puppet parser:

Provides auto-complete options for puppet parser sub-command.
This commit is contained in:
Mark Small 2014-05-05 22:14:42 +01:00
commit f51f858bb3

View file

@ -404,6 +404,14 @@ _node_arguments=(
'--terminus: TERMINUS The indirector terminus to use'
)
local -a _parser_arguments
_parser_arguments=(
'validate:Validate the syntax of one or more Puppet manifests'
'--render-as:FORMAT The rendering format to use'
'--verbose:Whether to log verbosely'
'--debug:Whether to log debug information'
)
__task_list ()
@ -824,6 +832,23 @@ __puppet-node ()
esac
}
__puppet-parser ()
{
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
':command:->command' \
'*::options:->options'
case $state in
(command)
_describe -t commands "gem subcommand" _parser_arguments
return
;;
esac
}
local expl
@ -968,6 +993,11 @@ case $state in
(node)
__puppet-node
;;
# Display sub-commands for puppet parser.
(parser)
__puppet-parser
;;
esac
;;
esac