]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
zsh-completion: make the arrays _sys_active_units, _sys_startable_units and _sys_rest...
authorEric Cook <llua@gmx.com>
Mon, 18 May 2015 05:02:43 +0000 (01:02 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 18 May 2015 09:22:09 +0000 (05:22 -0400)
shell-completion/zsh/_systemctl.in

index 0d409c681ccbfe476a3e7626fe6a095ad6e3145c..1dc6406bebad900a1dde896a2698cda2b8efca57 100644 (file)
@@ -208,7 +208,7 @@ done
 # Completion functions for STARTABLE_UNITS
 (( $+functions[_systemctl_start] )) || _systemctl_start()
 {
-   _systemctl_startable_units
+   local _sys_startable_units; _systemctl_startable_units
    compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
 }
 
@@ -216,7 +216,7 @@ done
 for fun in stop kill try-restart condrestart ; do
   (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
   {
-    _systemctl_active_units
+    local _sys_active_units; _systemctl_active_units
     compadd "$@" - $( _filter_units_by_property CanStop yes \
       ${_sys_active_units[*]} )
   }
@@ -234,7 +234,7 @@ done
 for fun in reload reload-or-try-restart force-reload ; do
   (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
   {
-    _systemctl_active_units
+    local _sys_active_units; _systemctl_active_units
     compadd "$@" - $( _filter_units_by_property CanReload yes \
       ${_sys_active_units[*]} )
   }
@@ -244,7 +244,7 @@ done
 for fun in restart reload-or-restart ; do
   (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
   {
-    _systemctl_restartable_units
+    local _sys_restartable_units; _systemctl_restartable_units
     compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
   }
 done