mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet facts:
Provides auto-complete options for puppet facts sub-command.
This commit is contained in:
parent
4af5708173
commit
48240a1dee
1 changed files with 34 additions and 0 deletions
|
|
@ -221,6 +221,18 @@ _doc_arguments=(
|
||||||
"--charset: <charset> Used only in 'rdoc' mode"
|
"--charset: <charset> Used only in 'rdoc' mode"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local -a _facts_arguments
|
||||||
|
_facts_arguments=(
|
||||||
|
"find:Retrieve a node's facts"
|
||||||
|
'info:Print the default terminus class for this face'
|
||||||
|
'save:API only: create or overwrite an object'
|
||||||
|
'--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 ()
|
__task_list ()
|
||||||
{
|
{
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -418,6 +430,23 @@ __puppet-doc ()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__puppet-facts ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
':command:->command' \
|
||||||
|
'*::options:->options'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_describe -t commands "gem subcommand" _facts_arguments
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -497,6 +526,11 @@ case $state in
|
||||||
(doc)
|
(doc)
|
||||||
__puppet-doc
|
__puppet-doc
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Display sub-commands for puppet facts.
|
||||||
|
(facts)
|
||||||
|
__puppet-facts
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue