mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
shell-completion: bash: Add systemd-analyze calendar options
Add completion for the systemd-analyze calendar options --iterations and --base-time.
This commit is contained in:
@@ -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") )
|
||||
|
||||
Reference in New Issue
Block a user