diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 18:36:28 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2022-12-24 18:38:00 +0900 |
| commit | a5cc26eee15a778802f3c71736e92cd180113c42 (patch) | |
| tree | 8f6751b839b6211d5362cfb8fe6bc757cf8625b9 /src/_virtualbox | |
| parent | Merge pull request #970 from zsh-users/add-updatecheck (diff) | |
| download | zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar.gz zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar.bz2 zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar.lz zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar.xz zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.tar.zst zsh-completions-a5cc26eee15a778802f3c71736e92cd180113c42.zip | |
Add modifynvram subcommand completion
Diffstat (limited to 'src/_virtualbox')
| -rw-r--r-- | src/_virtualbox | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/src/_virtualbox b/src/_virtualbox index c6cbf29..700a3b4 100644 --- a/src/_virtualbox +++ b/src/_virtualbox @@ -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 |
