From: Simon Barth Date: Tue, 11 Nov 2025 19:59:30 +0000 (+0100) Subject: shell-completion: bash: Add systemd-analyze calendar options X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a049825708d0c2835df6784faf0c397e1fb3988f;p=thirdparty%2Fsystemd.git shell-completion: bash: Add systemd-analyze calendar options Add completion for the systemd-analyze calendar options --iterations and --base-time. --- diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index a6861013b8d..a863af7affd 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -77,7 +77,7 @@ _systemd_analyze() { ) local -A VERBS=( - [STANDALONE]='time blame unit-files unit-paths exit-status compare-versions calendar timestamp timespan pcrs nvpcrs srk has-tpm2 smbios11 chid image-policy' + [STANDALONE]='time blame unit-files unit-paths exit-status compare-versions timestamp timespan pcrs nvpcrs srk has-tpm2 smbios11 chid image-policy' [CRITICAL_CHAIN]='critical-chain' [DOT]='dot' [DUMP]='dump' @@ -96,6 +96,7 @@ _systemd_analyze() { [UNIT_SHELL]='unit-shell' [UNIT_GDB]='unit-gdb' [FILESYSTEMS]='filesystems' + [CALENDAR]='calendar' ) local CONFIGS='locale.conf systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf @@ -282,6 +283,11 @@ _systemd_analyze() { else comps=$( __get_filesystem_sets ) fi + + elif __contains_word "$verb" ${VERBS[CALENDAR]}; then + if [[ $cur = -* ]]; then + comps='--help --version --iterations --base-time' + fi fi COMPREPLY=( $(compgen -W '$comps' -- "$cur") )