]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell completion: add kernel-identify/inspect verbs for bootctl
authorLuca Boccassi <luca.boccassi@gmail.com>
Tue, 18 Feb 2025 21:15:08 +0000 (21:15 +0000)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Sat, 22 Feb 2025 11:15:12 +0000 (12:15 +0100)
Follow-up for a05255981ba5b04f1cf54ea656fbce1dfd9c3a68
Follow-up for 3e0a3a0259324b4c40a9a62c8506fe683cd0273b

(cherry picked from commit 6a6d4c3f3c123a1cbb6770f1cae8c130a48333e1)

shell-completion/bash/bootctl

index 775cc450553be1bcb627ec2e1a7cf0e5bb5c3077..708eb5b4ae3eadc7b9736b3cab25d941adfd0612 100644 (file)
@@ -74,6 +74,7 @@ _bootctl() {
         [STANDALONE]='help status install update remove is-installed random-seed systemd-efi-options list set-timeout set-timeout-oneshot cleanup'
         [BOOTENTRY]='set-default set-oneshot unlink'
         [BOOLEAN]='reboot-to-firmware'
+        [FILE]='kernel-identify kernel-inspect'
     )
 
     for ((i=0; i < COMP_CWORD; i++)); do
@@ -104,6 +105,9 @@ _bootctl() {
         fi
     elif __contains_word "$verb" ${VERBS[BOOLEAN]}; then
         comps="yes no"
+    elif __contains_word "$verb" ${VERBS[FILE]}; then
+        comps=$( compgen -A file -- "$cur" )
+        compopt -o filenames
     fi
 
     COMPREPLY=( $(compgen -W '$comps' -- "$cur") )