summaryrefslogtreecommitdiff
path: root/shell-completion
diff options
context:
space:
mode:
authorEric Cook <llua@gmx.com>2015-05-18 01:02:38 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2015-05-18 05:22:08 -0400
commit67afa93148ca51eb1d37717ad3c3cac980be1c7a (patch)
tree78b1f452c63ca40ec2cc42222bfab01f3a80036a /shell-completion
parent903e7c37caaaedf8ab0b6c664f4946cce369c0f0 (diff)
zsh-completion: actually run _filter_units_by_property when creating the arrays _sys_(re|)startable_units
Diffstat (limited to 'shell-completion')
-rw-r--r--shell-completion/zsh/_systemctl.in9
1 files changed, 5 insertions, 4 deletions
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index e123d31a72..678e81ed7f 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -149,20 +149,20 @@ _systemctl_get_template_names() { __systemctl list-unit-files | { while read -r
_systemctl_active_units() {_sys_active_units=( $(__systemctl list-units | { while read -r a b; do echo -E - " $a"; done; }) )}
_systemctl_startable_units(){
- _sys_startable_units=(_filter_units_by_property ActiveState inactive $(
+ _sys_startable_units=( $( _filter_units_by_property ActiveState inactive $(
_filter_units_by_property CanStart yes $(
__systemctl $mode list-unit-files --state enabled,disabled,static | \
{ while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
__systemctl $mode list-units --state inactive,failed | \
- { while read -r a b; do echo -E - " $a"; done; } )))
+ { while read -r a b; do echo -E - " $a"; done; } )) ) )
}
_systemctl_restartable_units(){
- _sys_restartable_units=(_filter_units_by_property CanStart yes $(
+ _sys_restartable_units=( $(_filter_units_by_property CanStart yes $(
__systemctl $mode list-unit-files --state enabled,disabled,static | \
{ while read -r a b; do [[ $a =~ @\. ]] || echo -E - " $a"; done; }
__systemctl $mode list-units | \
- { while read -r a b; do echo -E - " $a"; done; } ))
+ { while read -r a b; do echo -E - " $a"; done; } )) )
}
_systemctl_failed_units() {_sys_failed_units=( $(__systemctl list-units --failed | { while read -r a b; do echo -E - " $a"; done; }) )}
@@ -170,6 +170,7 @@ _systemctl_enabled_units() {_sys_enabled_units=( $(__systemctl list-unit-files
_systemctl_disabled_units(){_sys_disabled_units=($(__systemctl list-unit-files | { while read -r a b; do [[ $b == "disabled" ]] && echo -E - " $a"; done; }) )}
_systemctl_masked_units() {_sys_masked_units=( $(__systemctl list-unit-files | { while read -r a b; do [[ $b == "masked" ]] && echo -E - " $a"; done; }) )}
+local fun
# Completion functions for ALL_UNITS
for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit ; do
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()