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.
This commit is contained in:
Lucas Werkmeister 2017-05-29 15:01:01 +02:00 committed by Lennart Poettering
parent 24c4b00b38
commit 0f8158bd26
2 changed files with 3 additions and 2 deletions

View File

@ -189,7 +189,7 @@ _systemctl () {
fi fi
local -A VERBS=( 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' [ENABLED_UNITS]='disable'
[DISABLED_UNITS]='enable' [DISABLED_UNITS]='enable'
[REENABLABLE_UNITS]='reenable' [REENABLABLE_UNITS]='reenable'

View File

@ -58,6 +58,7 @@
"kexec:Shut down and reboot the system with kexec" "kexec:Shut down and reboot the system with kexec"
"exit:Ask for user instance termination" "exit:Ask for user instance termination"
"switch-root:Change root directory" "switch-root:Change root directory"
"revert:Revert unit files to their vendor versions"
) )
if (( CURRENT == 1 )); then if (( CURRENT == 1 )); then
@ -157,7 +158,7 @@ _systemctl_unit_state() { typeset -gA _sys_unit_state; _sys_unit_state=( $(__sys
local fun local fun
# Completion functions for ALL_UNITS # 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() (( $+functions[_systemctl_$fun] )) || _systemctl_$fun()
{ {
_systemctl_really_all_units _systemctl_really_all_units