diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9ba17db16..62d8fe3f9 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -412,6 +412,14 @@ _parser_arguments=( '--debug:Whether to log debug information' ) +local -a _plugin_arguments +_plugin_arguments=( + 'download:Download plugins from the puppet master' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () @@ -849,6 +857,23 @@ __puppet-parser () esac } +__puppet-plugin () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _plugin_arguments + return + ;; + esac +} + local expl @@ -998,6 +1023,11 @@ case $state in (parser) __puppet-parser ;; + + # Display sub-commands for puppet plugin. + (plugin) + __puppet-plugin + ;; esac ;; esac