From e4e868f3aeedccfe04c6b6c3be026c7f8873370a Mon Sep 17 00:00:00 2001 From: Eric Cook Date: Mon, 18 May 2015 01:02:40 -0400 Subject: zsh-completion: less forking in _systemctl_get_template_names() --- shell-completion/zsh/_systemctl.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index fc9fc2ea00..304fec4782 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -143,7 +143,7 @@ _filter_units_by_property() { done } -_systemctl_get_template_names() { __systemctl list-unit-files | { while read -r a b; do [[ $a =~ @\. ]] && echo -E - " ${a%%@.*}@"; done; } } +_systemctl_get_template_names() { echo -E - ${^${(M)${(f)"$(__systemctl list-unit-files)"}##*@.[^[:space:]]##}%%@.*}\@ } _systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )} -- cgit v1.2.3-54-g00ecf