Merge pull request #971 from zsh-users/add-modifynvram

Add modifynvram subcommand completion
This commit is contained in:
Shohei YOSHIDA 2022-12-24 19:15:14 +09:00 committed by GitHub
commit 428473bcc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 46 additions and 1 deletions

View File

@ -330,7 +330,7 @@ _vboxmanage() {
_vboxmanage_updatecheck
;;
(modifynvram)
# TODO
_vboxmanage_modifynvram
;;
(discardstate|getextradata|setextradata)
_arguments \
@ -1003,6 +1003,51 @@ _vboxmanage_updatecheck() {
return $ret
}
(( $+functions[_vboxmanage_modifynvram] )) ||
_vboxmanage_modifynvram() {
local ret=1
_arguments -C \
'1: :_vboxmachines' \
'2: :(inituefivarstore enrollmssignatures enrollorclpk enrollpk listvars queryvar deletevar changevar)' \
'*:: :->arg' \
&& ret=0
case $state in
(arg)
compset -n 2
case $words[1] in
(enrollpk)
_arguments \
'--platform-key=[The platform key provided as a DER encoded X]: :_files' \
'--owner-uuid=[The UUID identifying the owner of the platform key]:uuid' \
&& ret=0
;;
(queryvar)
_arguments \
'--name=[UEFI variable name to query]:name' \
'--filename=[Where to store the content of the variable upon success]: :_files' \
&& ret=0
;;
(deletevar)
_arguments \
'--name=[UEFI variable name to query]:name' \
'--owner-uuid=[The UUID identifying the owner of the variable to delete]:uuid' \
&& ret=0
;;
(queryvar)
_arguments \
'--name=[UEFI variable name to change the data for]:name' \
'--filename=[The file to read the data from]: :_files' \
&& ret=0
;;
esac
;;
esac
return $ret
}
(( $+functions[_vboxheadless] )) ||
_vboxheadless() {
local ret=1