]> git.ipfire.org Git - thirdparty/systemd.git/commit
zsh-completion: systemctl: pass only $PREFIX* to list-unit*
authorEmil Velikov <emil.velikov@collabora.com>
Mon, 30 Apr 2018 12:37:51 +0000 (13:37 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 11 Jun 2018 16:09:56 +0000 (17:09 +0100)
commitff728637cc5013e3b58b4fa5c6cf39e662c5474b
tree8b7ae392b8a28f49e31a4db9889a2f924736a7a2
parentc839b729c5f7b08f6d91bf9567d0b1f91d17e0f7
zsh-completion: systemctl: pass only $PREFIX* to list-unit*

Using a leading * and $SUFFIX produces misleading results. Let's imagine
that one mistypes nect instead of netc, they will get a rather
misleading completion like:  sys-fs-fuse-connections.mount

Not to mention that the execution time is up by ~1/3.
time systemctl list-unit-files netctl* -> ~12ms
time systemctl list-unit-files *netctl* -> ~17ms

Furthermore more units are matched, leading to greater execution time
of `systemctl show' in _filter_units_by_property

Use only $PREFIX*, removing the leading * and trailing $SUFFIX*.

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
shell-completion/zsh/_systemctl.in