summaryrefslogtreecommitdiff
path: root/shell-completion/zsh
diff options
context:
space:
mode:
authorEmil Velikov <emil.velikov@collabora.com>2018-06-07 16:24:45 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2018-06-11 17:09:58 +0100
commit98476dc8b23d3ac7cb7e818a066f519c888ef8ac (patch)
tree169eeaefa76482cfb03b65162fbbc0c135033281 /shell-completion/zsh
parent8a6236e51aea33788f543f79aa611486a17cd612 (diff)
downloadsystemd-98476dc8b23d3ac7cb7e818a066f519c888ef8ac.tar.gz
shell-completion: systemctl: pass current word to all list_unit*
Earlier patch added the current word to the performance critical paths. Here we add it to every place, for consistency sake. Suggested-by: Yu Watanabe (yuwata) Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
Diffstat (limited to 'shell-completion/zsh')
-rw-r--r--shell-completion/zsh/_systemctl.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 9ade70b820..e49129b902 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -106,7 +106,7 @@ _systemctl_all_units()
if ( [[ ${+_sys_all_units} -eq 0 ]] || _cache_invalid SYS_ALL_UNITS$_sys_service_mgr ) ||
! _retrieve_cache SYS_ALL_UNITS$_sys_service_mgr;
then
- _sys_all_units=( ${${(f)"$(__systemctl list-units --all)"}%% *} )
+ _sys_all_units=( ${${(f)"$(__systemctl list-units --all "$PREFIX*" )"}%% *} )
_store_cache SYS_ALL_UNITS$_sys_service_mgr _sys_all_units
fi
}
@@ -119,7 +119,7 @@ _systemctl_really_all_units()
if ( [[ ${+_sys_really_all_units} -eq 0 ]] || _cache_invalid SYS_REALLY_ALL_UNITS$_sys_service_mgr ) ||
! _retrieve_cache SYS_REALLY_ALL_UNITS$_sys_service_mgr;
then
- all_unit_files=( ${${(f)"$(__systemctl list-unit-files)"}%% *} )
+ all_unit_files=( ${${(f)"$(__systemctl list-unit-files "$PREFIX*" )"}%% *} )
_systemctl_all_units
really_all_units=($_sys_all_units $all_unit_files)
_sys_really_all_units=(${(u)really_all_units})
@@ -270,7 +270,7 @@ done
(( $+functions[_systemctl_set-default] )) || _systemctl_set-default()
{
_wanted systemd-targets expl target \
- compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all)"}%% *} ||
+ compadd "$@" - ${${(f)"$(__systemctl list-unit-files --type target --all "$PREFIX*" )"}%% *} ||
_message "no targets found"
}