mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Add auto-completion for puppet parser:
Provides auto-complete options for puppet parser sub-command.
This commit is contained in:
parent
5b354cf280
commit
f51f858bb3
1 changed files with 30 additions and 0 deletions
|
|
@ -404,6 +404,14 @@ _node_arguments=(
|
||||||
'--terminus: TERMINUS The indirector terminus to use'
|
'--terminus: TERMINUS The indirector terminus to use'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local -a _parser_arguments
|
||||||
|
_parser_arguments=(
|
||||||
|
'validate:Validate the syntax of one or more Puppet manifests'
|
||||||
|
'--render-as:FORMAT The rendering format to use'
|
||||||
|
'--verbose:Whether to log verbosely'
|
||||||
|
'--debug:Whether to log debug information'
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__task_list ()
|
__task_list ()
|
||||||
|
|
@ -824,6 +832,23 @@ __puppet-node ()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__puppet-parser ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
':command:->command' \
|
||||||
|
'*::options:->options'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_describe -t commands "gem subcommand" _parser_arguments
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -968,6 +993,11 @@ case $state in
|
||||||
(node)
|
(node)
|
||||||
__puppet-node
|
__puppet-node
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Display sub-commands for puppet parser.
|
||||||
|
(parser)
|
||||||
|
__puppet-parser
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue