systemd/shell-completion
Emil Velikov c839b729c5 bash-completion: systemctl: pass current partial unit to list-unit*
Pass the partial name of the unit file to list-unit-files and
list-units. This allows for faster completion, since systemctl does
not need to list all the unit files.

For reference:
 - time systemctl list-unit-files -> ~200ms
 - time systemctl list-unit-files netctl* -> ~15ms
 - time systemctl list-units -> ~5ms
 - time systemctl list-units netctl* -> ~5ms

While the list-units time itself is unaffected, now a shorter list is
produced. Thus as we pass it to `systemctl show' (via
__filter_units_by_properties) the execution time will be decreased even
further.

v2: Update list-units hunk in commit message, add quotes around $2*
v3: Remove funky indentation, quote all $cur instances

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
2018-06-11 17:09:55 +01:00
..
bash bash-completion: systemctl: pass current partial unit to list-unit* 2018-06-11 17:09:55 +01:00
zsh zsh-completion: suggest bus properties instead of configuration items for 'systemctl -p' 2018-05-28 18:14:49 +09:00