diff options
author | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-22 18:04:45 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@sbcglobal.net> | 2016-10-22 18:04:45 -0400 |
commit | 549f55b104d68bdc7351ff3bc511e9ccadd84a3a (patch) | |
tree | 4b5c16c7b82aae576d066cbd0943663ae7717cfc /src/grp-boot/bootctl/bootctl.completion.zsh | |
parent | be38937dd1322f1d85eb54226b0f4f33a16e8b53 (diff) |
./tools/notsd-move
Diffstat (limited to 'src/grp-boot/bootctl/bootctl.completion.zsh')
-rw-r--r-- | src/grp-boot/bootctl/bootctl.completion.zsh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/grp-boot/bootctl/bootctl.completion.zsh b/src/grp-boot/bootctl/bootctl.completion.zsh new file mode 100644 index 0000000000..0e1b0a5562 --- /dev/null +++ b/src/grp-boot/bootctl/bootctl.completion.zsh @@ -0,0 +1,30 @@ +#compdef bootctl + +(( $+functions[_bootctl_command] )) || _bootctl_command() +{ + local -a _bootctl_cmds + _bootctl_cmds=( + "status:Show status of installed systemd-boot and EFI variables" + "install:Install systemd-boot to the ESP and EFI variables" + "update:Update systemd-boot in the ESP and EFI variables" + "remove:Remove systemd-boot from the ESP and EFI variables" + ) + if (( CURRENT == 1 )); then + _describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@" + else + local curcontext="$curcontext" + cmd="${${_bootctl_cmds[(r)$words[1]:*]%%:*}}" + if (( $+functions[_bootctl_$cmd] )); then + _bootctl_$cmd + else + _message "no more options" + fi + fi +} + +_arguments \ + {-h,--help}'[Prints a short help text and exits.]' \ + '--version[Prints a short version string and exits.]' \ + '--path=[Path to the EFI System Partition (ESP)]:path:_directories' \ + '--no-variables[Do not touch EFI variables]' \ + '*::bootctl command:_bootctl_command' |