mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Add auto-completion for puppet catalog:
Provides auto-complete options for puppet catalog sub-command.
This commit is contained in:
parent
5794fcd28a
commit
d306e2fc27
1 changed files with 35 additions and 0 deletions
|
|
@ -105,6 +105,19 @@ _ca_arguments=(
|
|||
'verify:undocumented action'
|
||||
)
|
||||
|
||||
local -a _catalog_arguments
|
||||
_catalog_arguments=(
|
||||
'apply:Find and apply a catalog'
|
||||
"download:Download this node's catalog from the puppet master server"
|
||||
'find:Retrieve the catalog for a node'
|
||||
'info:Print the default terminus class for this face'
|
||||
'save:API only: create or overwrite an object'
|
||||
'select:Retrieve a catalog and filter it for resources of a given type'
|
||||
'--render-as:FORMAT The rendering format to use'
|
||||
'--verbose:Whether to log verbosely'
|
||||
'--debug:Whether to log debug information'
|
||||
)
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
local expl
|
||||
|
|
@ -166,6 +179,23 @@ __puppet-ca ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-catalog ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _catalog_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -205,6 +235,11 @@ case $state in
|
|||
(ca)
|
||||
__puppet-ca
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet catalog.
|
||||
(catalog)
|
||||
__puppet-catalog
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue