shell-completion: add systemctl revert (#6042)
authorLucas Werkmeister <mail@lucaswerkmeister.de>
Mon, 29 May 2017 13:01:01 +0000 (15:01 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 29 May 2017 13:01:01 +0000 (15:01 +0200)
The `systemctl revert` command was added in v230 (commit 344ca7556b),
but was missing from the shell completion specifications.

Fixes #5978.

shell-completion/bash/systemctl.in
shell-completion/zsh/_systemctl.in

index 907d7dd..0398d09 100644 (file)
@@ -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'
index 92a56ba..7d3d47b 100644 (file)
@@ -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