summaryrefslogtreecommitdiff
path: root/shell-completion/bash
diff options
context:
space:
mode:
authorjoshuazivkovic <joshua.zivkovic@codethink.co.uk>2022-12-14 12:31:59 +0000
committerjoshuazivkovic <joshua.zivkovic@codethink.co.uk>2023-01-18 14:33:08 +0000
commitf21a6502d81ca5690467cb161dafd4b875e4430e (patch)
tree8de0d69465cfe6309952118154b6b85151eba7c7 /shell-completion/bash
parentdc57a3387bbe7770491f35e0d993f411237636b5 (diff)
downloadsystemd-f21a6502d81ca5690467cb161dafd4b875e4430e.tar.gz
systemd-analyze: Add tab complete logic for plot
Diffstat (limited to 'shell-completion/bash')
-rw-r--r--shell-completion/bash/systemd-analyze8
1 files changed, 7 insertions, 1 deletions
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze
index b1baec9978..5edba7bf58 100644
--- a/shell-completion/bash/systemd-analyze
+++ b/shell-completion/bash/systemd-analyze
@@ -62,7 +62,7 @@ _systemd_analyze() {
)
local -A VERBS=(
- [STANDALONE]='time blame plot unit-paths exit-status calendar timestamp timespan'
+ [STANDALONE]='time blame unit-paths exit-status calendar timestamp timespan'
[CRITICAL_CHAIN]='critical-chain'
[DOT]='dot'
[DUMP]='dump'
@@ -72,6 +72,7 @@ _systemd_analyze() {
[SECURITY]='security'
[CONDITION]='condition'
[INSPECT_ELF]='inspect-elf'
+ [PLOT]='plot'
)
local CONFIGS='systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf
@@ -195,6 +196,11 @@ _systemd_analyze() {
comps=$( compgen -A file -- "$cur" )
compopt -o filenames
fi
+
+ elif __contains_word "$verb" ${VERBS[PLOT]}; then
+ if [[ $cur = -* ]]; then
+ comps='--help --version --system --user --global --no-pager --json=off --json=pretty --json=short --table --no-legend'
+ fi
fi
COMPREPLY=( $(compgen -W '$comps' -- "$cur") )