1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-14 15:21:37 +03:00
systemd/shell-completion/zsh/_bootctl

31 lines
1.0 KiB
Plaintext
Raw Normal View History

2013-11-14 08:02:23 +04:00
#compdef bootctl
(( $+functions[_bootctl_command] )) || _bootctl_command()
{
local -a _bootctl_cmds
_bootctl_cmds=(
2015-05-24 14:25:52 +03:00
"status:Show status of installed systemd-boot and EFI variables"
"install:Install systemd-boot to the ESP and EFI variables"
2015-05-24 14:25:52 +03:00
"update:Update systemd-boot in the ESP and EFI variables"
"remove:Remove systemd-boot from the ESP and EFI variables"
2013-11-14 08:02:23 +04:00
)
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.]' \
2015-05-24 14:25:52 +03:00
'--path=[Path to the EFI System Partition (ESP)]:path:_directories' \
'--no-variables[Do not touch EFI variables]' \
2013-11-14 08:02:23 +04:00
'*::bootctl command:_bootctl_command'