]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell-completion: Add completion in bootctl
authorNishal Kulkarni <nishalkulkarni@gmail.com>
Fri, 18 Mar 2022 06:59:36 +0000 (12:29 +0530)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 18 Mar 2022 09:19:56 +0000 (09:19 +0000)
Added new completion for `--make-machine-id-directory`
provideds 3 options(yes no auto)

Closes: #22308
shell-completion/bash/bootctl
shell-completion/zsh/_bootctl

index 190e3d33f5eac988ae88c93f4cd005c8ff1c5d91..11062e1b7adc16be97ae5004ca639e0bb4e08d01 100644 (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
index 87ecbe37c3fd4de63dd90c9457f808c01fc1966c..eef48d71d9be720935cb26ac464870f4473eacd7 100644 (file)
@@ -69,6 +69,7 @@ _arguments \
     '--boot-path=[Path to the $BOOT partition]:path:_directories' \
     {-p,--print-esp-path}'[Print path to the EFI system partition]' \
     {-x,--print-boot-path}'[Print path to the $BOOT partition]' \
+    '--make-machine-id-directory=[Control creation and deletion of the top-level machine ID directory.]:options:(yes no auto)' \
     '--no-variables[Do not touch EFI variables]' \
     '--no-pager[Do not pipe output into a pager]' \
     '--graceful[Do not fail when locating ESP or writing fails]' \