mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Add auto-completion for puppet certificate:
Provides auto-complete options for puppet certificate sub-command.
This commit is contained in:
parent
73d3a70ea0
commit
9080167f45
1 changed files with 32 additions and 0 deletions
|
|
@ -131,6 +131,16 @@ _cert_arguments=(
|
||||||
'reinventory:Build an inventory of the issued certificates'
|
'reinventory:Build an inventory of the issued certificates'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local -a _certificate_arguments
|
||||||
|
_certificate_arguments=(
|
||||||
|
'destroy:Delete a certificate'
|
||||||
|
'find:Retrieve a certificate'
|
||||||
|
'generate:Generate a new certificate signing request'
|
||||||
|
'info:Print the default terminus class for this face'
|
||||||
|
'list:List all certificate signing requests'
|
||||||
|
'sign:Sign a certificate signing request for HOST'
|
||||||
|
)
|
||||||
|
|
||||||
__task_list ()
|
__task_list ()
|
||||||
{
|
{
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -226,6 +236,23 @@ __puppet-cert ()
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__puppet-certificate ()
|
||||||
|
{
|
||||||
|
local curcontext="$curcontext" state line
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
':command:->command' \
|
||||||
|
'*::options:->options'
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
(command)
|
||||||
|
_describe -t commands "gem subcommand" _certificate_arguments
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
local expl
|
local expl
|
||||||
|
|
@ -275,6 +302,11 @@ case $state in
|
||||||
(cert)
|
(cert)
|
||||||
__puppet-cert
|
__puppet-cert
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
# Display sub-commands for puppet certificate.
|
||||||
|
(certificate)
|
||||||
|
__puppet-certificate
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue