mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet master:
Provides auto-complete options for puppet master sub-command.
This commit is contained in:
parent
41838d0aaf
commit
50afe1d2a4
1 changed files with 41 additions and 0 deletions
|
|
@ -358,6 +358,25 @@ _man_arguments=(
|
|||
'--debug:Whether to log debug information'
|
||||
)
|
||||
|
||||
local -a _master_arguments
|
||||
_master_arguments=(
|
||||
'-D:Send the process into the background'
|
||||
'--daemonize:Send the process into the background'
|
||||
'--no-daemonize:Do not send the process into the background'
|
||||
'-d:Enable full debugging'
|
||||
'--debug:Enable full debugging'
|
||||
'-h:Print this help message'
|
||||
'--help:Print this help message'
|
||||
'-l:<file>|console|syslog Where to send messages'
|
||||
'--logdest:<file>|console|syslog Where to send messages'
|
||||
'-v:Enable verbosity'
|
||||
'--verbose:Enable verbosity'
|
||||
'-V:Print the puppet version number and exit'
|
||||
'--version:Print the puppet version number and exit'
|
||||
'--compile:<node-name> Compile a catalogue and output it in JSON from the puppet master'
|
||||
)
|
||||
|
||||
|
||||
|
||||
__task_list ()
|
||||
{
|
||||
|
|
@ -726,6 +745,23 @@ __puppet-man ()
|
|||
esac
|
||||
}
|
||||
|
||||
__puppet-master ()
|
||||
{
|
||||
local curcontext="$curcontext" state line
|
||||
typeset -A opt_args
|
||||
|
||||
_arguments -C \
|
||||
':command:->command' \
|
||||
'*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
_describe -t commands "gem subcommand" _master_arguments
|
||||
return
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
|
||||
local expl
|
||||
|
|
@ -855,6 +891,11 @@ case $state in
|
|||
(man)
|
||||
__puppet-man
|
||||
;;
|
||||
|
||||
# Display sub-commands for puppet master.
|
||||
(master)
|
||||
__puppet-master
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue