mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-15 04:41:19 +02:00
Add auto-completion for puppet describe:
Provides auto-complete options for puppet describe sub-command.
This commit is contained in:
parent
eaae32d0c3
commit
0b0593a22d
1 changed files with 31 additions and 0 deletions
|
|
@ -180,6 +180,15 @@ _config_arguments=(
|
||||||
'--section:SECTION_NAME The section of the configuration file to interact with'
|
'--section:SECTION_NAME The section of the configuration file to interact with'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local -a _describe_arguments
|
||||||
|
_describe_arguments=(
|
||||||
|
'--help:Print this help text'
|
||||||
|
'--providers:Describe providers in detail for each type'
|
||||||
|
'--list:List all types'
|
||||||
|
'--meta:List all metaparameters'
|
||||||
|
'--short:List only parameters without detail'
|
||||||
|
)
|
||||||
|
|
||||||
__task_list ()
|
__task_list ()
|
||||||
{
|
{
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -326,6 +335,23 @@ __puppet-config ()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__puppet-describe ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
':command:->command' \
|
||||||
|
'*::options:->options'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_describe -t commands "gem subcommand" _describe_arguments
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -390,6 +416,11 @@ case $state in
|
||||||
(config)
|
(config)
|
||||||
__puppet-config
|
__puppet-config
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Display sub-commands for puppet describe.
|
||||||
|
(describe)
|
||||||
|
__puppet-describe
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue