mirror of
https://github.com/Dasharo/systemd.git
synced 2026-03-06 15:02:31 -08:00
bash-completion: update options for bootctl
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
3f0d8b2dbd
commit
2789437be5
@@ -31,13 +31,13 @@ _bootctl() {
|
||||
local i verb comps
|
||||
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||
local -A OPTS=(
|
||||
[STANDALONE]='-h --help --no-variables -p --print-path --version --no-pager'
|
||||
[ARG]='--path'
|
||||
[STANDALONE]='-h --help --no-variables -p --print-esp-path -x --print-boot-path --version --no-pager'
|
||||
[ARG]='--esp-path --boot-path'
|
||||
)
|
||||
|
||||
if __contains_word "$prev" ${OPTS[ARG]}; then
|
||||
case $prev in
|
||||
--path)
|
||||
--esp-path|--boot-path)
|
||||
if [[ -z $cur ]]; then
|
||||
comps=$(compgen -A directory -- "/" )
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user