3 (( $+functions[_machinectl_command] )) || _machinectl_command()
5 local -a _machinectl_cmds
7 "list:List currently running VMs/containers"
8 "status:Show VM/container status"
9 "show:Show properties of one or more VMs/containers"
10 "terminate:Terminate one or more VMs/containers"
11 "kill:Send signal to process or a VM/container"
13 if (( CURRENT == 1 )); then
14 _describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@"
16 local curcontext="$curcontext"
17 cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}"
20 list) msg="no options" ;;
25 _message "no more options"
31 {-h,--help}'[Prints a short help text and exits.]' \
32 '--version[Prints a short version string and exits.]' \
33 \*{-p+,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
34 {-a,--all}'[Show all proerties]' \
35 (-l,--full)'[Do not ellipsize cgroup members]' \
36 '--no-pager[Do not pipe output into a pager]' \
37 '--no-ask-password[Do not ask for system passwords]' \
38 '--kill-who=[Who to send signal to]:killwho:(leader all)' \
39 {-s+,--signal=}'[Which signal to send]:signal:_signals' \
40 {-H+,--host=}'[Show information for remote host]:userathost:_sd_hosts_or_user_at_host' \
41 {-P,--privileged}'[Acquire privileges before execution]' \
42 '*::machinectl command:_machinectl_command'