1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00

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
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'

View 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