chiark / gitweb /
networkd: netdev - split NetDev struct into per-kind structs
[elogind.git] / shell-completion / zsh / _bootctl
1 #compdef bootctl
2
3 (( $+functions[_bootctl_command] )) || _bootctl_command()
4 {
5     local -a _bootctl_cmds
6     _bootctl_cmds=(
7         "status:Show current firmware and boot settings"
8     )
9     if (( CURRENT == 1 )); then
10         _describe -t commands 'bootctl command' _bootctl_cmds || compadd "$@"
11     else
12         local curcontext="$curcontext"
13         cmd="${${_bootctl_cmds[(r)$words[1]:*]%%:*}}"
14         if (( $+functions[_bootctl_$cmd] )); then
15             _bootctl_$cmd
16         else
17             _message "no more options"
18         fi
19     fi
20 }
21
22 _arguments \
23     {-h,--help}'[Prints a short help text and exits.]' \
24     '--version[Prints a short version string and exits.]' \
25     '*::bootctl command:_bootctl_command'