summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorLuca Boccassi <luca.boccassi@microsoft.com>2021-11-26 18:07:37 +0000
committerLuca Boccassi <luca.boccassi@microsoft.com>2021-11-26 18:08:59 +0000
commit83de7427dc7897669cfd83b3af7d6bbb914a307c (patch)
tree2c658852f84d7fc1c85ca06ca4f5c1580a11cd6c /shell-completion
parent13c02e7bd54e4420c392bd76c0fcf1846c10f99c (diff)
downloadsystemd-83de7427dc7897669cfd83b3af7d6bbb914a307c.tar.gz
shell-completion: add offline/root/image to systemd-analyze
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/bash/systemd-analyze7
1 files changed, 5 insertions, 2 deletions
diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze
index 1972441386..350dcabb94 100644
--- a/shell-completion/bash/systemd-analyze
+++ b/shell-completion/bash/systemd-analyze
@@ -145,14 +145,17 @@ _systemd_analyze() {
elif __contains_word "$verb" ${VERBS[SECURITY]}; then
if [[ $cur = -* ]]; then
- comps='--help --version --no-pager --system --user -H --host -M --machine --offline --threshold --security-policy --json=off --json=pretty --json=short'
- else
+ comps='--help --version --no-pager --system --user -H --host -M --machine --offline --threshold --security-policy --json=off --json=pretty --json=short --root --image'
+ elif ! __contains_word "--offline" ${COMP_WORDS[*]}; then
if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user
else
mode=--system
fi
comps=$( __get_services $mode )
+ else
+ comps="$CONFIGS $( compgen -A file -- "$cur" )"
+ compopt -o filenames
fi
elif __contains_word "$verb" ${VERBS[CONDITION]}; then