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

26 lines
721 B
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=(
"status:Show current firmware and boot settings"
)
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.]' \
'*::bootctl command:_bootctl_command'