]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion/bootctl: add missing options and verb 38856/head
authorAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 8 Sep 2025 10:37:26 +0000 (12:37 +0200)
committerAntonio Alvarez Feijoo <antonio.feijoo@suse.com>
Mon, 8 Sep 2025 10:37:26 +0000 (12:37 +0200)
shell-completion/bash/bootctl

index a06a93e8c2bb9a9be1077f02a0ef7927e519b764..31aaa1caceebd90b970803357a796e74cfd79490 100644 (file)
@@ -32,13 +32,20 @@ _bootctl() {
     local i verb comps
     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 --dry-run'
-        [ARG]='--esp-path --boot-path --make-machine-id-directory --root --image --install-source --random-seed'
+        [STANDALONE]='-h --help --version
+                      -p --print-esp-path -x --print-boot-path --print-loader-path
+                      --print-stub-path -R --print-root-device -RR
+                      --no-pager --graceful -q --quiet --all-architectures
+                      --dry-run'
+        [ARG]='--esp-path --boot-path --root --image --image-policy --install-source
+               --variables --random-seed --make-entry-directory --entry-token --json
+               --efi-boot-option-description --secure-boot-auto-enroll --private-key
+               --private-key-source --certificate --certificate-source'
     )
 
     if __contains_word "$prev" ${OPTS[ARG]}; then
         case $prev in
-            --esp-path|--boot-path)
+            --esp-path|--boot-path|--private-key|--certificate)
                 if [[ -z $cur ]]; then
                     comps=$(compgen -A directory -- "/" )
                 else
@@ -46,9 +53,12 @@ _bootctl() {
                 fi
                 compopt -o filenames
                 ;;
-            --make-machine-id-directory)
+            --make-entry-directory)
                 comps="yes no auto"
                 ;;
+            --entry-token)
+                comps="machine-id os-id os-image-id auto literal:"
+                ;;
             --image|--root)
                 compopt -o nospace
                 comps=$( compgen -A file -- "$cur" )
@@ -56,9 +66,12 @@ _bootctl() {
             --install-source)
                 comps="image host auto"
                 ;;
-            --random-seed)
+            --random-seed|--variables|--secure-boot-auto-enroll)
                 comps="yes no"
                 ;;
+            --json)
+                comps=$( bootctl --json=help 2>/dev/null )
+                ;;
         esac
         COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
         return 0
@@ -71,7 +84,7 @@ _bootctl() {
 
     local -A VERBS=(
         [STANDALONE]='help status install update remove is-installed random-seed list set-timeout set-timeout-oneshot cleanup'
-        [BOOTENTRY]='set-default set-oneshot unlink'
+        [BOOTENTRY]='set-default set-oneshot set-sysfail unlink'
         [BOOLEAN]='reboot-to-firmware'
         [FILE]='kernel-identify kernel-inspect'
     )