mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet config:
Provides auto-complete options for puppet config sub-command.
This commit is contained in:
parent
b85cbcc753
commit
eaae32d0c3
1 changed files with 32 additions and 0 deletions
|
|
@ -170,6 +170,16 @@ _certificate_revocation_list_arguments=(
|
|||
'--terminus: TERMINUS The indirector terminus to use'
|
||||
)
|
||||
|
||||
local -a _config_arguments
|
||||
_config_arguments=(
|
||||
"print:Examine Puppet's current settings"
|
||||
"set:Set Puppet's settings"
|
||||
'--render-as:FORMAT The rendering format to use'
|
||||
'--verbose:Whether to log verbosely'
|
||||
'--debug:Whether to log debug information'
|
||||
'--section:SECTION_NAME The section of the configuration file to interact with'
|
||||
)
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
local expl
|
||||
|
|
@ -299,6 +309,23 @@ __puppet-certificate_revocation_list ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-config ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _config_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -358,6 +385,11 @@ case $state in
|
|||
(certificate_revocation_list)
|
||||
__puppet-certificate_revocation_list
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet config.
|
||||
(config)
|
||||
__puppet-config
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue