]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bash-completion/analyze: show candidates for --debugger 38253/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Jul 2025 16:44:25 +0000 (01:44 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 17 Jul 2025 16:47:25 +0000 (01:47 +0900)
This also adds missing completion for --debugger-arguments.

Follow-up for ad6e02e7b42db35178305614e643be7a62568d87.

shell-completion/bash/systemd-analyze

index d3d3fe4c63e45eecc07e3574bac4c47f931dd0fb..3eeeffd241da4abee3237aeb380690b419c790b8 100644 (file)
@@ -62,8 +62,9 @@ _systemd_analyze() {
 
     local -A OPTS=(
         [STANDALONE]='-h --help --version --system --user --global --order --require --no-pager
-                             --man=no --generators=yes -q --quiet'
-        [ARG]='-H --host -M --machine --fuzz --from-pattern --to-pattern --root --debugger'
+                      --man=no --generators=yes -q --quiet'
+        [ARG]='-H --host -M --machine --fuzz --from-pattern --to-pattern --root --debugger
+               -A --debugger-arguments'
     )
 
     local -A VERBS=(
@@ -116,6 +117,12 @@ _systemd_analyze() {
             --machine|-M)
                 comps=$( __get_machines )
                 ;;
+            --debugger)
+                comps="gdb lldb"
+                ;;
+            *)
+                return 0
+                ;;
         esac
         COMPREPLY=( $(compgen -W '$comps' -- "$cur") )
         return 0