mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-04 12:41:39 +00:00
zsh-completion: less forking in _systemctl_get_template_names()
(cherry picked from commit e4e868f3ae)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
5fcc4e9b79
commit
5ee6d932fe
@@ -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; }) )}
|
||||
|
||||
Reference in New Issue
Block a user