From 60c68080b7853b90c435fe807aaf6ad9bec5645b Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 10 Nov 2025 17:05:31 +0100 Subject: [PATCH 1/4] shell-completion: zsh: add systemd-analyze architectures completion --- shell-completion/zsh/_systemd-analyze | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index d938a07509..90ca1476c7 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -40,6 +40,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 +89,7 @@ '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' # log-level, log-target, service-watchdogs have been deprecated ) From 7112e08cec4a4f15b7d931398b68adfee15ff5d9 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 10 Nov 2025 17:21:11 +0100 Subject: [PATCH 2/4] shell-completion: zsh: add missing completions for systemd-analyze Adds missing simple verbs which already exist in bash completion. --- shell-completion/zsh/_systemd-analyze | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index 90ca1476c7..8e7172d165 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -90,6 +90,12 @@ '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 ) From 49ff5ad6e6704f5124a1f9af4010b35f7edf12d2 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 10 Nov 2025 19:23:21 +0100 Subject: [PATCH 3/4] shell-completion: bash: add systemd-analyze image-policy completion --- shell-completion/bash/systemd-analyze | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 0ed8191c0a..8d05544941 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -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' From 1e29036afcbd5edeef4e3ade70089e71517b3cc6 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 10 Nov 2025 19:34:46 +0100 Subject: [PATCH 4/4] shell-completion: zsh: add completion for systemd-analyze inspect-elf --- shell-completion/zsh/_systemd-analyze | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index 8e7172d165..e87af915d7 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -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