diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 954d95c7a..81583610b 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -350,6 +350,14 @@ _kick_arguments=( '--ping:Do an ICMP echo against the target host' ) +local -a _man_arguments +_man_arguments=( + 'man:Display the manual page for a Puppet subcommand' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () { @@ -701,6 +709,23 @@ __puppet-kick () esac } +__puppet-man () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _man_arguments + return + ;; + esac +} + local expl @@ -825,6 +850,11 @@ case $state in (kick) __puppet-kick ;; + + # Display sub-commands for puppet man. + (man) + __puppet-man + ;; esac ;; esac