diff --git a/shell-completion/bash/systemd-analyze b/shell-completion/bash/systemd-analyze index 41a2151e127..e4ecafeddca 100644 --- a/shell-completion/bash/systemd-analyze +++ b/shell-completion/bash/systemd-analyze @@ -81,6 +81,7 @@ _systemd_analyze() { [ARCHITECTURES]='architectures' [FDSTORE]='fdstore' [CAPABILITY]='capability' + [TRANSIENT_SETTINGS]='transient-settings' ) local CONFIGS='locale.conf systemd/bootchart.conf systemd/coredump.conf systemd/journald.conf @@ -225,6 +226,13 @@ _systemd_analyze() { if [[ $cur = -* ]]; then comps='--help --version --no-pager --json=off --json=pretty --json=short -m --mask' fi + + elif __contains_word "$verb" ${VERBS[TRANSIENT_SETTINGS]}; then + if [[ $cur = -* ]]; then + comps='--help --version --no-pager' + else + comps="$(systemctl --no-legend --no-pager -t help)" + fi fi COMPREPLY=( $(compgen -W '$comps' -- "$cur") ) diff --git a/shell-completion/zsh/_systemd-analyze b/shell-completion/zsh/_systemd-analyze index 50542b39628..e03ae31afd7 100644 --- a/shell-completion/zsh/_systemd-analyze +++ b/shell-completion/zsh/_systemd-analyze @@ -47,6 +47,13 @@ _describe 'plot options' _options } +(( $+functions[_systemd-analyze_transient-settings] )) || + _systemd-analyze_transient-settings() { + local -a _types + _types=( $(systemctl --no-pager --no-legend -t help) ) + _describe -t types 'unit types' _types + } + (( $+functions[_systemd-analyze_commands] )) || _systemd-analyze_commands(){ local -a _systemd_analyze_cmds @@ -74,6 +81,7 @@ JSON or table format' 'security:Analyze security settings of a service' 'inspect-elf:Parse and print ELF package 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 )