diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index c96cd2243..9ba17db16 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -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