From: Eisuke Kawashima Date: Tue, 13 May 2025 00:04:52 +0000 (+0900) Subject: shell-completion: fix completion of `systemctl --user unset-environment` (#37409) X-Git-Tag: v256.14~28 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=003a0bb9e3bfef9ab99ce409ea08d6fb544440d0;p=thirdparty%2Fsystemd.git shell-completion: fix completion of `systemctl --user unset-environment` (#37409) Co-authored-by: Eisuke Kawashima (cherry picked from commit 6d07d23b022d48898d9a2e7181ab6493d3d61c43) (cherry picked from commit 11c16d414ebbcb13e39971d90ece4a1e0db183d2) --- diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index df9045f229b..c787c42af7f 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -412,7 +412,7 @@ for fun in set-environment unset-environment ; do suf='-S=' fi _wanted systemd-environment expl 'environment variable' \ - compadd "$@" ${suf} - ${${(f)"$(systemctl show-environment)"}%%=*} + compadd "$@" ${suf} - ${${(f)"$(systemctl "$_sys_service_mgr" show-environment)"}%%=*} } done