diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 9a8397524..7dc2349ef 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -105,6 +105,19 @@ _ca_arguments=( 'verify:undocumented action' ) +local -a _catalog_arguments +_catalog_arguments=( + 'apply:Find and apply a catalog' + "download:Download this node's catalog from the puppet master server" + 'find:Retrieve the catalog for a node' + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + 'select:Retrieve a catalog and filter it for resources of a given type' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' +) + __task_list () { local expl @@ -166,6 +179,23 @@ __puppet-ca () esac } +__puppet-catalog () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _catalog_arguments + return + ;; + esac +} + local expl @@ -205,6 +235,11 @@ case $state in (ca) __puppet-ca ;; + + # Display sub-commands for puppet catalog. + (catalog) + __puppet-catalog + ;; esac ;; esac