mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet man:
Provides auto-complete options for puppet man sub-command.
This commit is contained in:
parent
57aff237c2
commit
41838d0aaf
1 changed files with 30 additions and 0 deletions
|
|
@ -350,6 +350,14 @@ _kick_arguments=(
|
||||||
'--ping:Do an ICMP echo against the target host'
|
'--ping:Do an ICMP echo against the target host'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local -a _man_arguments
|
||||||
|
_man_arguments=(
|
||||||
|
'man:Display the manual page for a Puppet subcommand'
|
||||||
|
'--render-as:FORMAT The rendering format to use'
|
||||||
|
'--verbose:Whether to log verbosely'
|
||||||
|
'--debug:Whether to log debug information'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
__task_list ()
|
__task_list ()
|
||||||
{
|
{
|
||||||
|
|
@ -701,6 +709,23 @@ __puppet-kick ()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__puppet-man ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
':command:->command' \
|
||||||
|
'*::options:->options'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_describe -t commands "gem subcommand" _man_arguments
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -825,6 +850,11 @@ case $state in
|
||||||
(kick)
|
(kick)
|
||||||
__puppet-kick
|
__puppet-kick
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Display sub-commands for puppet man.
|
||||||
|
(man)
|
||||||
|
__puppet-man
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue