From: Ronan Pigott Date: Mon, 7 Aug 2023 19:13:23 +0000 (-0700) Subject: zsh: use sys_really_all_units for non-template names X-Git-Tag: v255-rc1~794^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c8e2cd79c155151bcdb983eedd24a6a77082c41b;p=thirdparty%2Fsystemd.git zsh: use sys_really_all_units for non-template names The systemctl invocations used for these completions match the ones used for the _sys_really_all_units parameter, so we should really just use the cached parameter rather than recomputing the result. --- diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 06a4be6b338..7b67ece1b0c 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -194,10 +194,10 @@ __systemctl() } (( $+functions[_systemctl_get_non_template_names] )) || - _systemctl_get_non_template_names() { echo -E - ${^${(R)${(f)"$( - __systemctl list-unit-files - __systemctl list-units --all - )"}:#*@.*}%%[[:space:]]*} } + _systemctl_get_non_template_names() { + _systemctl_really_all_units + print -r - ${_sys_really_all_units:#*@.*} + } (( $+functions[_systemctl_get_template_names] )) || _systemctl_get_template_names() {