ryantimwilson / rpms / systemd

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