Blob Blame History Raw
From 16f48ba5c9c432bc9daa215ceadbe739be1a1928 Mon Sep 17 00:00:00 2001
From: Lucas Werkmeister <mail@lucaswerkmeister.de>
Date: Mon, 29 May 2017 15:01:01 +0200
Subject: [PATCH] shell-completion: add systemctl revert (#6042)

The `systemctl revert` command was added in v230 (commit 344ca7556b),
but was missing from the shell completion specifications.

Fixes #5978.
(cherry picked from commit 0f8158bd26ded859ffcca70c4750939800ea6c51)
---
 shell-completion/bash/systemctl.in | 2 +-
 shell-completion/zsh/_systemctl.in | 3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in
index e4ccad8799..3e553c1e6c 100644
--- a/shell-completion/bash/systemctl.in
+++ b/shell-completion/bash/systemctl.in
@@ -189,7 +189,7 @@ _systemctl () {
         fi
 
         local -A VERBS=(
-                [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property'
+                [ALL_UNITS]='is-active is-failed is-enabled status show cat mask preset help list-dependencies edit set-property revert'
             [ENABLED_UNITS]='disable'
            [DISABLED_UNITS]='enable'
         [REENABLABLE_UNITS]='reenable'
diff --git a/shell-completion/zsh/_systemctl.in b/shell-completion/zsh/_systemctl.in
index 92a56ba99a..7d3d47bef9 100644
--- a/shell-completion/zsh/_systemctl.in
+++ b/shell-completion/zsh/_systemctl.in
@@ -58,6 +58,7 @@
     "kexec:Shut down and reboot the system with kexec"
     "exit:Ask for user instance termination"
     "switch-root:Change root directory"
+    "revert:Revert unit files to their vendor versions"
   )
 
   if (( CURRENT == 1 )); then
@@ -157,7 +158,7 @@ _systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__sys
 
 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
+for fun in is-active is-failed is-enabled status show cat mask preset help list-dependencies edit revert ; do
   (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
   {
     _systemctl_really_all_units