diff options
author | Daniel Hahler <git@thequod.de> | 2016-08-11 18:46:31 +0200 |
---|---|---|
committer | Daniel Hahler <git@thequod.de> | 2016-08-11 18:46:31 +0200 |
commit | 56ef545c24a4b83f6ad9f542a1159b2130a30f3e (patch) | |
tree | 66d08a988b624cf984a59acda1ec77a4409fa448 /shell-completion/zsh/_systemctl.in | |
parent | 29df65f913ec7d360637ef1703ec284bb1fa6821 (diff) |
zsh: _filter_units_by_property: respect --user
Use `$_sys_service_mgr` to handle `--user`, so that `systemctl --user
stop` will correctly filter the active (user) units. Before this patch,
only user units that also exist as system units and are stoppable there
would be listed.
Diffstat (limited to 'shell-completion/zsh/_systemctl.in')
-rw-r--r-- | shell-completion/zsh/_systemctl.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in index 44c31b7833..69f643303d 100644 --- a/shell-completion/zsh/_systemctl.in +++ b/shell-completion/zsh/_systemctl.in @@ -126,7 +126,7 @@ _filter_units_by_property() { local property=$1 value=$2 ; shift ; shift local -a units ; units=($*) local props - for props in ${(ps:\n\n:)"$(_call_program units "$service show --no-pager --property="Id,$property" -- ${units} 2>/dev/null")"}; do + for props in ${(ps:\n\n:)"$(_call_program units "$service $_sys_service_mgr show --no-pager --property="Id,$property" -- ${units} 2>/dev/null")"}; do props=(${(f)props}) if [[ "${props[2]}" = "$property=$value" ]]; then echo -E - " ${props[1]#Id=}" |