systemd-analyze shell completion improvements (#39673)

This commit is contained in:
Luca Boccassi
2025-11-10 20:06:09 +00:00
committed by GitHub
2 changed files with 20 additions and 1 deletions
+1 -1
View File
@@ -68,7 +68,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'
[STANDALONE]='time blame unit-files unit-paths exit-status compare-versions calendar timestamp timespan pcrs nvpcrs srk has-tpm2 smbios11 chid image-policy'
[CRITICAL_CHAIN]='critical-chain'
[DOT]='dot'
[DUMP]='dump'
+19
View File
@@ -11,6 +11,11 @@
_files -W '(/run/systemd/ /etc/systemd/ /usr/lib/systemd/)' -P 'systemd/'
}
(( $+functions[_systemd-analyze_inspect-elf] )) ||
_systemd-analyze_inspect-elf() {
_files
}
(( $+functions[_systemd-analyze_critical-chain] )) ||
_systemd-analyze_critical-chain() {
local -a _units
@@ -40,6 +45,13 @@
_describe -t groups 'file system groups' _groups || compadd "$@"
}
(( $+functions[_systemd-analyze_architectures] )) ||
_systemd-analyze_architectures() {
local -a _architectures
_architectures=( $(systemd-analyze --quiet --no-pager --no-legend architectures | { while read -r a b; do echo " $a"; done; } 2>/dev/null) )
_describe -t architectures 'architectures' _architectures || compadd "$@"
}
(( $+functions[_systemd-analyze_plot] )) ||
_systemd-analyze_plot() {
local -a _options
@@ -82,6 +94,13 @@
'dlopen-metadata:Parse and print ELF dlopen metadata'
'has-tpm2:Report whether TPM2 support is available'
'transient-settings:List transient settings for unit types'
'architectures:List known architectures'
'smbios11:List strings passed via SMBIOS Type #11'
'chid:List local CHIDs'
'compare-versions:Compare two version strings'
'image-policy:Analyze image policy string'
'pcrs:Show TPM2 PCRs and their names'
'srk:Write TPM2 SRK (to FILE)'
# log-level, log-target, service-watchdogs have been deprecated
)