]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell-completion: add missing args to bash systemd-analyze
authorArthur Zamarin <arthurzam@gentoo.org>
Sat, 27 Apr 2024 17:54:40 +0000 (20:54 +0300)
committerArthur Zamarin <arthurzam@gentoo.org>
Wed, 1 May 2024 16:17:59 +0000 (19:17 +0300)
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
shell-completion/bash/systemd-analyze

index eb1061f7875244061668cfa628cfc3b347208b2c..75ea1dc757c2bb0fbd25a3643f01d1031d79f385 100644 (file)
@@ -67,7 +67,7 @@ _systemd_analyze() {
     )
 
     local -A VERBS=(
-        [STANDALONE]='time blame unit-paths exit-status calendar timestamp timespan'
+        [STANDALONE]='time blame unit-files unit-paths exit-status capability compare-versions calendar timestamp timespan pcrs srk'
         [CRITICAL_CHAIN]='critical-chain'
         [DOT]='dot'
         [DUMP]='dump'
@@ -79,11 +79,12 @@ _systemd_analyze() {
         [INSPECT_ELF]='inspect-elf'
         [PLOT]='plot'
         [ARCHITECTURES]='architectures'
+        [FDSTORE]='fdstore'
     )
 
-    local CONFIGS='systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf
+    local CONFIGS='locale.conf systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf
                        systemd/journal-remote.conf systemd/journal-upload.conf systemd/logind.conf
-                       systemd/resolved.conf systemd/networkd.conf systemd/resolved.conf
+                       systemd/resolved.conf systemd/networkd.conf systemd/pstore.conf systemd/resolved.conf
                        systemd/sleep.conf systemd/system.conf systemd/timedated.conf
                        systemd/timesyncd.conf systemd/user.conf udev/udev.conf'
 
@@ -211,6 +212,13 @@ _systemd_analyze() {
         else
             comps=$( __get_architectures )
         fi
+
+    elif __contains_word "$verb" ${VERBS[FDSTORE]}; then
+        if [[ $cur = -* ]]; then
+            comps='--help --version --system --user --global -H --host -M --machine --no-pager --json=off --json=pretty --json=short --root --image'
+        else
+            comps=$( __get_services $mode )
+        fi
     fi
 
     COMPREPLY=( $(compgen -W '$comps' -- "$cur") )