]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
shell-completion: zsh: add systemd-analyze architectures completion
authorJelle van der Waa <jelle@vdwaa.nl>
Mon, 10 Nov 2025 16:05:31 +0000 (17:05 +0100)
committerJelle van der Waa <jelle@vdwaa.nl>
Mon, 10 Nov 2025 19:09:01 +0000 (20:09 +0100)
shell-completion/zsh/_systemd-analyze

index d938a07509e829c031b0d4d85b72579702eb5d8d..90ca1476c76bc4230747aea7f1724ada3558e991 100644 (file)
         _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
         )