diff --git a/custom/plugins/puppet/_puppet b/custom/plugins/puppet/_puppet index 6d9cc162f..44718ef47 100644 --- a/custom/plugins/puppet/_puppet +++ b/custom/plugins/puppet/_puppet @@ -314,6 +314,20 @@ _instrumentation_probe_arguments=( '--terminus: TERMINUS The indirector terminus to use' ) +local -a _key_arguments +_key_arguments=( + 'destroy:Delete an object' + 'find:Retrieve an object by name' + 'info:Print the default terminus class for this face' + 'save:API only: create or overwrite an object' + 'search:Search for an object or retrieve multiple objects' + '--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 () { @@ -631,6 +645,23 @@ __puppet-instrumentation_probe () esac } +__puppet-key () +{ + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "gem subcommand" _key_arguments + return + ;; + esac +} + local expl @@ -745,6 +776,11 @@ case $state in (instrumentation_probe) __puppet-instrumentation_probe ;; + + # Display sub-commands for puppet key. + (key) + __puppet-key + ;; esac ;; esac