mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet module:
Provides auto-complete options for puppet module sub-command.
This commit is contained in:
parent
50afe1d2a4
commit
cc4294dd45
1 changed files with 38 additions and 0 deletions
|
|
@ -376,6 +376,22 @@ _master_arguments=(
|
|||
'--compile:<node-name> Compile a catalogue and output it in JSON from the puppet master'
|
||||
)
|
||||
|
||||
local -a _module_arguments
|
||||
_module_arguments=(
|
||||
'build:Build a module release package'
|
||||
'changes:Show modified files of an installed module'
|
||||
'generate:Generate boilerplate for a new module'
|
||||
'install:Install a module from the Puppet Forge or a release archive'
|
||||
'list:List installed modules'
|
||||
'search:Search the Puppet Forge for a module'
|
||||
'uninstall:Uninstall a puppet module'
|
||||
'upgrade:Upgrade a puppet module'
|
||||
'-verbose:Whether to log verbosely'
|
||||
'--debug:Whether to log debug information'
|
||||
'--environment: production The environment Puppet is running in'
|
||||
'--modulepath:$basemodulepath The search path for modules'
|
||||
)
|
||||
|
||||
|
||||
|
||||
__task_list ()
|
||||
|
|
@ -762,6 +778,23 @@ __puppet-master ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-module ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _module_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -896,6 +929,11 @@ case $state in
|
|||
(master)
|
||||
__puppet-master
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet module.
|
||||
(module)
|
||||
__puppet-module
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue