summaryrefslogtreecommitdiff
path: root/shell-completion/zsh/_systemctl.in
diff options
context:
space:
mode:
authorEric Cook <llua@gmx.com>2015-05-18 01:02:40 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-05-18 05:22:08 -0400
commite4e868f3aeedccfe04c6b6c3be026c7f8873370a (patch)
treee6655b89ca6b4a2f05ebfcdc176e84fe8390beea /shell-completion/zsh/_systemctl.in
parentfb869ca1d20e503708ae813c3d3ebcf5a5173c25 (diff)
zsh-completion: less forking in _systemctl_get_template_names()
Diffstat (limited to 'shell-completion/zsh/_systemctl.in')
-rw-r--r--shell-completion/zsh/_systemctl.in2
1 files changed, 1 insertions, 1 deletions
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; }) )}