zsh: _systemctl: do not attempt to use "--system" by default (#3951)

System Internals / systemd - Daniel Hahler [thequod.de] - 13 August 2016 09:42 UTC

In 68c4f6d the following was added:

local -a _modes; _modes=("--user" "--system") local _sys_service_mgr=${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}

With the following comment:

> If neither are on the line, --system is set; for system services to be > completed.

But it does not work as documented:

% _modes=(--user --system) % words=() % echo ${${words:*_modes}[(R)(${(j.|.)_modes})]:---system}

However, it should not use `--system` in that case anyway, so this patch removes the part that should cause a default to be used and adds some comments.

e09d0d4 zsh: _systemctl: do not attempt to use "--system" by default (#3951)
shell-completion/zsh/_systemctl.in | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Upstream: github.com


  • Share