|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From 16f48ba5c9c432bc9daa215ceadbe739be1a1928 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
From: Lucas Werkmeister <mail@lucaswerkmeister.de>
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Date: Mon, 29 May 2017 15:01:01 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Subject: [PATCH] shell-completion: add systemctl revert (#6042)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
The `systemctl revert` command was added in v230 (commit 344ca7556b),
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
but was missing from the shell completion specifications.
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
Fixes #5978.
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
(cherry picked from commit 0f8158bd26ded859ffcca70c4750939800ea6c51)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
---
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
shell-completion/bash/systemctl.in | 2 +-
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
shell-completion/zsh/_systemctl.in | 3 ++-
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
index e4ccad8799..3e553c1e6c 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
--- a/shell-completion/bash/systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+++ b/shell-completion/bash/systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -189,7 +189,7 @@ _systemctl () {
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
fi
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
local -A VERBS=(
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
- [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property'
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property revert'
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
[ENABLED_UNITS]='disable'
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
[DISABLED_UNITS]='enable'
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
[REENABLABLE_UNITS]='reenable'
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
index 92a56ba99a..7d3d47bef9 100644
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
--- a/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+++ b/shell-completion/zsh/_systemctl.in
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -58,6 +58,7 @@
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
"kexec:Shut down and reboot the system with kexec"
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
"exit:Ask for user instance termination"
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
"switch-root:Change root directory"
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+ "revert:Revert unit files to their vendor versions"
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
)
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
if (( CURRENT == 1 )); then
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
@@ -157,7 +158,7 @@ _systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__sys
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
local fun
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
# Completion functions for ALL_UNITS
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
-for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit ; do
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
+for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit revert ; do
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
(( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
{
|
|
Zbigniew Jędrzejewski-Szmek |
d743bb |
_systemctl_really_all_units
|