shell-completion: add completion for machinectl restart

The `restart` verb was added to machinectl as a convenience alias for
`reboot`, but its shell completions were never updated. Add it to both
the bash and zsh completions.
This commit is contained in:
guolin
2026-08-13 15:55:03 +01:00
committed by Luca Boccassi
parent 4f80cc06a1
commit 9269952ab2
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ _machinectl() {
local -A VERBS=(
[STANDALONE]='list list-images clean pull-tar pull-raw list-transfers cancel-transfer import-fs'
[MACHINES]='status show start stop login shell enable disable poweroff reboot pause resume terminate kill
[MACHINES]='status show start stop login shell enable disable poweroff reboot restart pause resume terminate kill
image-status show-image remove export-tar export-raw'
[MACHINES_OR_FILES]='edit cat'
[MACHINE_ONLY]='clone rename set-limit bind-volume unbind-volume'
+2 -1
View File
@@ -38,6 +38,7 @@
"disable:Disable automatic container start at boot"
"poweroff:Power off one or more VMs/containers"
"reboot:Reboot one or more VMs/containers"
"restart:Restart one or more VMs/containers (equal to reboot)"
"pause:Pause one or more machines"
"resume:Resume one or more previously paused machines"
"terminate:Terminate one or more VMs/containers"
@@ -81,7 +82,7 @@
start|enable|disable)
_machinectl_images ;;
status|show|poweroff|reboot|pause|resume|terminate|kill)
status|show|poweroff|reboot|restart|pause|resume|terminate|kill)
_sd_machines ;;
login|shell)