diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index ad1a68193..f2ad25ed9 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -450,6 +450,18 @@ _resource_arguments=( '--types:List all available types' ) +local -a _resource_type_arguments +_resource_type_arguments=( + 'find:Retrieve info about a resource collection' + 'info:Print the default terminus class for this face' + 'search:Search for collections matching a regular expression' + '--render-as:FORMAT The rendering format to use' + '--verbose:Whether to log verbosely' + '--debug:Whether to log debug information' + '--extra:HASH Extra arguments to pass to the indirection request' + '--terminus: TERMINUS The indirector terminus to use' +) + __task_list () @@ -938,6 +950,23 @@ __puppet-resource () esac } +__puppet-resource_type () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _resource_type_arguments + return + ;; + esac +} + local expl @@ -1102,6 +1131,11 @@ case $state in (resource) __puppet-resource ;; + + # Display sub-commands for puppet resource_type. + (resource_type) + __puppet-resource_type + ;; esac ;; esac