projects
/
platform
/
upstream
/
systemd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb869ca
)
zsh-completion: less forking in _systemctl_get_template_names()
author
Eric Cook
<llua@gmx.com>
Mon, 18 May 2015 05:02:40 +0000
(
01:02
-0400)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Mon, 18 May 2015 09:22:08 +0000
(
05:22
-0400)
shell-completion/zsh/_systemctl.in
patch
|
blob
|
history
diff --git
a/shell-completion/zsh/_systemctl.in
b/shell-completion/zsh/_systemctl.in
index
fc9fc2e
..
304fec4
100644
(file)
--- 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; }) )}