$ systemctl --version
systemd 245 (245-2-arch)
It appears that the output format of systemctl --no-pager --no-legend --full list-units has changed in v245 and some zsh completions are broken as a result.
The format has changed from,
v244:
$ systemctl --no-pager --no-legend --full list-unit-files
my-unit.service loaded active running [...]
[...]
v245:
$ systemctl --no-pager --no-legend --full list-unit-files
my-unit.service loaded active running [...]
[...]
(notice the leading spaces)
The zsh completions for systemctl use one of those magical zsh parameter expansion parsers to get an array of active units,
|
_systemctl_active_units() {_sys_active_units=( ${${(f)"$(__systemctl list-units "$PREFIX*" )"}%% *} )} |
which is tripped up by the leading spaces, resulting in an always empty list of active units.
Steps to reproduce:
- Use zsh
systemctl stop <TAB>
Expected: autocomplete list of active unit names
Actual: nothing
I'm guessing that the change in format is unintentional (perhaps from de9a8fe?), but if not the zsh completions could be updated to compensate. Please advise.
It appears that the output format of
systemctl --no-pager --no-legend --full list-unitshas changed in v245 and some zsh completions are broken as a result.The format has changed from,
v244:
v245:
(notice the leading spaces)
The zsh completions for systemctl use one of those magical zsh parameter expansion parsers to get an array of active units,
systemd/shell-completion/zsh/_systemctl.in
Line 200 in 0335d11
which is tripped up by the leading spaces, resulting in an always empty list of active units.
Steps to reproduce:
systemctl stop <TAB>Expected: autocomplete list of active unit names
Actual: nothing
I'm guessing that the change in format is unintentional (perhaps from de9a8fe?), but if not the zsh completions could be updated to compensate. Please advise.