From 9269952ab26af1ca9036c6e7131710e67fd2076f Mon Sep 17 00:00:00 2001 From: guolin Date: Thu, 13 Aug 2026 21:28:36 +0800 Subject: [PATCH] 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. --- shell-completion/bash/machinectl | 2 +- shell-completion/zsh/_machinectl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shell-completion/bash/machinectl b/shell-completion/bash/machinectl index d6627e6ba7..a40255967b 100644 --- a/shell-completion/bash/machinectl +++ b/shell-completion/bash/machinectl @@ -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' diff --git a/shell-completion/zsh/_machinectl b/shell-completion/zsh/_machinectl index d61a62ee27..33520901f8 100644 --- a/shell-completion/zsh/_machinectl +++ b/shell-completion/zsh/_machinectl @@ -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)