From b1856a6c4afb146c83d8960cf9581fc27aa1fca1 Mon Sep 17 00:00:00 2001 From: Daan De Meyer Date: Thu, 30 Oct 2025 14:44:00 +0100 Subject: [PATCH] analyze: Add shell completion for dlopen-metadata --- shell-completion/bash/systemd-analyze | 9 +++++++++ shell-completion/zsh/_systemd-analyze | 1 + 2 files changed, 10 insertions(+) diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 3eeeffd241d..832da33021b 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -78,6 +78,7 @@ _systemd_analyze() { [SECURITY]='security' [CONDITION]='condition' [INSPECT_ELF]='inspect-elf' + [DLOPEN_METADATA]='dlopen-metadata' [PLOT]='plot' [ARCHITECTURES]='architectures' [FDSTORE]='fdstore' @@ -212,6 +213,14 @@ _systemd_analyze() { compopt -o filenames fi + elif __contains_word "$verb" ${VERBS[DLOPEN_METADATA]}; then + if [[ $cur = -* ]]; then + comps='--help --version --json=off --json=pretty --json=short' + else + comps=$( compgen -A file -- "$cur" ) + compopt -o filenames + fi + elif __contains_word "$verb" ${VERBS[PLOT]}; then if [[ $cur = -* ]]; then comps='--help --version --system --user --global --no-pager --json=off --json=pretty --json=short --table --no-legend --scale-svg --detailed' diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index dfbc70d138c..d938a07509e 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -79,6 +79,7 @@ 'timespan:Parse a systemd syntax timespan' 'security:Analyze security settings of a service' 'inspect-elf:Parse and print ELF package metadata' + 'dlopen-metadata:Parse and print ELF dlopen metadata' 'has-tpm2:Report whether TPM2 support is available' 'transient-settings:List transient settings for unit types' # log-level, log-target, service-watchdogs have been deprecated