mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet resource_type:
Provides auto-complete options for puppet resource_type sub-command.
This commit is contained in:
parent
dc1d497b87
commit
207ce1ec8a
1 changed files with 34 additions and 0 deletions
|
|
@ -450,6 +450,18 @@ _resource_arguments=(
|
|||
'--types:<type>List all available types'
|
||||
)
|
||||
|
||||
local -a _resource_type_arguments
|
||||
_resource_type_arguments=(
|
||||
'find:Retrieve info about a resource collection'
|
||||
'info:Print the default terminus class for this face'
|
||||
'search:Search for collections matching a regular expression'
|
||||
'--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 ()
|
||||
|
|
@ -938,6 +950,23 @@ __puppet-resource ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-resource_type ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _resource_type_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -1102,6 +1131,11 @@ case $state in
|
|||
(resource)
|
||||
__puppet-resource
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet resource_type.
|
||||
(resource_type)
|
||||
__puppet-resource_type
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue