|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
From 29ead1919564e18dc7a3aee2214543db02aea72d Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
From: Eric Cook <llua@gmx.com>
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
Date: Mon, 18 May 2015 01:02:43 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
Subject: [PATCH] zsh-completion: make the arrays _sys_active_units,
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
_sys_startable_units and _sys_restartable_units local to the completer.
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
(cherry picked from commit bf8864c2c07f3bdab4ab4287bf2b5d3b5ce21f5c)
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
shell-completion/zsh/_systemctl.in | 8 ++++----
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
1 file changed, 4 insertions(+), 4 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
index 2a3e21bf17..673b976e34 100644
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
--- a/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
+++ b/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
@@ -208,7 +208,7 @@ done
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
# Completion functions for STARTABLE_UNITS
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
(( $+functions[_systemctl_start] )) || _systemctl_start()
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
{
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
- _systemctl_startable_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
+ local _sys_startable_units; _systemctl_startable_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
compadd "$@" - ${_sys_startable_units[*]} $(_systemctl_get_template_names)
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
@@ -216,7 +216,7 @@ done
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
for fun in stop kill try-restart condrestart ; do
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
{
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
- _systemctl_active_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
+ local _sys_active_units; _systemctl_active_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
compadd "$@" - $( _filter_units_by_property CanStop yes \
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
${_sys_active_units[*]} )
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
@@ -234,7 +234,7 @@ done
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
for fun in reload reload-or-try-restart force-reload ; do
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
{
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
- _systemctl_active_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
+ local _sys_active_units; _systemctl_active_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
compadd "$@" - $( _filter_units_by_property CanReload yes \
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
${_sys_active_units[*]} )
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
@@ -244,7 +244,7 @@ done
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
for fun in restart reload-or-restart ; do
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
{
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
- _systemctl_restartable_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
+ local _sys_restartable_units; _systemctl_restartable_units
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
compadd "$@" - ${_sys_restartable_units[*]} $(_systemctl_get_template_names)
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
}
|
|
Zbigniew Jędrzejewski-Szmek |
a48f80 |
done
|