diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index fdd3f98ab..7f4741392 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -206,6 +206,21 @@ _device_arguments=( '--waitforcert: This option only matters for daemons that do not yet have certificates' ) +local -a _doc_arguments +_doc_arguments=( + '-a:Output the docs for all of the reference types' + '--all:Output the docs for all of the reference types' + '-h:Print this help message' + '--help:Print this help message' + "-o: Used only in 'rdoc' mode" + "--outputdir: Used only in 'rdoc' mode" + '-m:text|pdf|rdoc Determine the output mode' + '--mode:text|pdf|rdoc Determine the output mode' + '-r: Build a particular reference' + '--reference: Build a particular reference' + "--charset: Used only in 'rdoc' mode" +) + __task_list () { local expl @@ -386,6 +401,23 @@ __puppet-device () esac } +__puppet-doc () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _doc_arguments + return + ;; + esac +} + local expl @@ -460,6 +492,11 @@ case $state in (device) __puppet-device ;; + + # Display sub-commands for puppet doc. + (doc) + __puppet-doc + ;; esac ;; esac