]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - shell-completion/zsh/_machinectl
Merge pull request #11241 from bengal/lldp-802-3-subtypes
[thirdparty/systemd.git] / shell-completion / zsh / _machinectl
index 198fa28f7b3720da78e0e78200ea14eb677177c9..a00fc910215ec39468d4527b91ae2ef69d73d5b3 100644 (file)
@@ -1,4 +1,5 @@
 #compdef machinectl
+# SPDX-License-Identifier: LGPL-2.1+
 
 __get_available_machines () {
     machinectl --no-legend list-images | {while read -r a b; do echo $a; done;}
@@ -23,6 +24,7 @@ _available_machines() {
     "status:Show VM/container status"
     "show:Show properties of one or more VMs/containers"
     "start:Start container as a service"
+    "stop:Stop container (equal to poweroff)"
     "login:Get a login prompt on a VM/container"
     "enable:Enable automatic container start at boot"
     "disable:Disable automatic container start at boot"
@@ -58,6 +60,8 @@ _available_machines() {
         case $cmd in
           list*|cancel-transfer|pull-tar|pull-raw)
             msg="no options" ;;
+          clone)
+            _available_machines ;;
           start)
             _available_machines ;;
           *)
@@ -85,7 +89,7 @@ _arguments \
   {-H+,--host=}'[Operate on remote host.]:userathost:_sd_hosts_or_user_at_host' \
   {-M+,--machine=}'[Operate on local container.]:machine:_sd_machines' \
   {-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
-  {-a,--all}'[Show all proerties.]' \
+  {-a,--all}'[Show all properties.]' \
   {-q,--quiet}'[Suppress output.]' \
   {-l,--full}'[Do not ellipsize cgroup members.]' \
   '--kill-who=[Who to send signal to.]:killwho:(leader all)' \