mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet plugin:
Provides auto-complete options for puppet plugin sub-command.
This commit is contained in:
parent
f51f858bb3
commit
6dd78d676e
1 changed files with 30 additions and 0 deletions
|
|
@ -412,6 +412,14 @@ _parser_arguments=(
|
|||
'--debug:Whether to log debug information'
|
||||
)
|
||||
|
||||
local -a _plugin_arguments
|
||||
_plugin_arguments=(
|
||||
'download:Download plugins from the puppet master'
|
||||
'--render-as:FORMAT The rendering format to use'
|
||||
'--verbose:Whether to log verbosely'
|
||||
'--debug:Whether to log debug information'
|
||||
)
|
||||
|
||||
|
||||
|
||||
__task_list ()
|
||||
|
|
@ -849,6 +857,23 @@ __puppet-parser ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-plugin ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _plugin_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -998,6 +1023,11 @@ case $state in
|
|||
(parser)
|
||||
__puppet-parser
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet plugin.
|
||||
(plugin)
|
||||
__puppet-plugin
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue