mirror of
https://github.com/systemd/systemd.git
synced 2024-12-14 20:54:02 +08:00
zsh-completion: less forking in _systemctl_get_template_names()
This commit is contained in:
parent
fb869ca1d2
commit
e4e868f3ae
@ -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; }) )}
|
||||
|
Loading…
Reference in New Issue
Block a user