shell-completion: Add completion in bootctl

Added new completion for `--make-machine-id-directory`
provideds 3 options(yes no auto)

Closes: #22308
This commit is contained in:
Nishal Kulkarni
2022-03-18 09:19:56 +00:00
committed by Luca Boccassi
parent c3e7fba07c
commit f1c70ed13d
2 changed files with 5 additions and 1 deletions
+4 -1
View File
@@ -32,7 +32,7 @@ _bootctl() {
local cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]}
local -A OPTS=(
[STANDALONE]='-h --help -p --print-esp-path -x --print-boot-path --version --no-variables --no-pager --graceful'
[ARG]='--esp-path --boot-path'
[ARG]='--esp-path --boot-path --make-machine-id-directory'
)
if __contains_word "$prev" ${OPTS[ARG]}; then
@@ -45,6 +45,9 @@ _bootctl() {
fi
compopt -o filenames
;;
--make-machine-id-directory)
comps="yes no auto"
;;
esac
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
return 0