mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet key:
Provides auto-complete options for puppet key sub-command.
This commit is contained in:
parent
6b8ae5e16c
commit
523554e691
1 changed files with 36 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue