1 #compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-delta systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tmpfiles systemd-tty-ask-password-agent machinectl
5 local curcontext="$curcontext" state lstate line
9 {-h,--help}'[Show this help]' \
10 '--icon=[Icon name]' \
11 '--timeout=[Timeout in sec]' \
12 '--no-tty[Ask question via agent even on TTY]' \
13 '--accept-cached[Accept cached passwords]' \
14 '--multiple[List multiple passwords if available]'
18 {-h,--help}'[Show this help]' \
19 '--version[Show package version.]' \
20 {-t,--identifier=}'[Set syslog identifier.]' \
21 {-p,--priority=}'[Set priority value.]:value:({0..7})' \
22 '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
27 {-h,--help}'[Show this help]' \
28 '--version[Show package version]' \
29 '--no-pager[Do not pipe output into a pager]' \
30 {-a,--all}'[Show all groups, including empty]' \
31 '-k[Include kernel threads in output]' \
32 ':cgroups:(cpuset cpu cpuacct memory devices freezer net_cls blkio)'
36 {-h,--help}'[Show this help]' \
37 '--version[Print version and exit]' \
38 '(-c -m -i -t)-p[Order by path]' \
39 '(-c -p -m -i)-t[Order by number of tasks]' \
40 '(-m -p -i -t)-c[Order by CPU load]' \
41 '(-c -p -i -t)-m[Order by memory load]' \
42 '(-c -m -p -t)-i[Order by IO load]' \
43 {-d,--delay=}'[Specify delay]' \
44 {-n,--iterations=}'[Run for N iterations before exiting]' \
45 {-b,--batch}'[Run in batch mode, accepting no input]' \
46 '--depth=[Maximum traversal depth]'
50 {-h,--help}'[Show this help]' \
51 '--version[Show package version]' \
52 '--no-pager[Do not pipe output into a pager]' \
53 '--diff=[Show a diff when overridden files differ]:boolean:(1 0)' \
54 {-t,--type=}'[Only display a selected set of override types]:types:(masked equivalent redirected overridden unchanged)' \
55 ':SUFFIX:(tmpfiles.d sysctl.d systemd/system)'
59 {-h,--help}'[Show this help]' \
60 '--version[Show package version]' \
61 {-c,--container}'[Only detect whether we are run in a container]' \
62 {-v,--vm}'[Only detect whether we are run in a VM]' \
63 {-q,--quiet}"[Don't output anything, just set return value]"
65 systemd-machine-id-setup)
67 {-h,--help}'[Show this help]' \
68 '--version[Show package version]'
72 {-h,--help}'[Show this help]' \
73 '--version[Show package version]' \
74 '--ready[Inform the init system about service start-up completion.]' \
75 '--pid=[Inform the init system about the main PID of the daemon]' \
76 '--status=[Send a free-form status string for the daemon to the init systemd]' \
77 '--booted[Returns 0 if the system was booted up with systemd]' \
78 '--readahead=[Controls disk read-ahead operations]:arguments:(cancel done noreply)'
82 '--create[Create, set ownership/permissions based on the config files.]' \
83 '--clean[Clean up all files and directories with an age parameter configured.]' \
84 '--remove[All files and directories marked with r, R in the configuration files are removed.]' \
85 '--prefix=[Only apply rules that apply to paths with the specified prefix.]' \
86 '--exclude-prefix=[Ignore rules that apply to paths with the specified prefix.]' \
87 '--help[Prints a short help text and exits.]' \
90 systemd-tty-ask-password-agent)
92 {-h,--help}'[Prints a short help text and exits.]' \
93 '--version[Prints a short version string and exits.]' \
94 '--list[Lists all currently pending system password requests.]' \
95 '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
96 '--watch[Continuously process password requests.]' \
97 '--wall[Forward password requests to wall(1).]' \
98 '--plymouth[Ask question with plymouth(8).]' \
99 '--console[Ask question on /dev/console.]'
103 {-h,--help}'[Prints a short help text and exits.]' \
104 '--version[Prints a short version string and exits.]' \
105 {-p,--property=}'[Limit output to specified property.]:property:(Name Id Timestamp TimestampMonotonic Service Scope Leader Class State RootDirectory)' \
106 {-a,--all}'[Show all proerties]' \
107 (-l,--full)'[Do not ellipsize cgroup members]' \
108 '--no-pager[Do not pipe output into a pager]' \
109 '--no-ask-password[Do not ask for system passwords]' \
110 '--kill-who=[Who to send signal to]:killwho:(leader all)' \
111 {-s,--signal=}'[Which signal to send]:signal:_signals' \
112 {-H,--host=}'[Show information for remote host]:userathost:_hosts_or_user_at_host' \
113 {-P,--privileged}'[Acquire privileges before execution]' \
114 '*::machinectl command:_machinectl_command'
120 _hosts_or_user_at_host()
123 'users-hosts:: _user_at_host' \
128 local -a _output_opts
129 _output_opts=(short short-monotonic verbose export json json-pretty json-see cat)
130 _describe -t output 'output mode' _output_opts || compadd "$@"
133 (( $+functions[_machinectl_command] )) || _machinectl_command()
135 local -a _machinectl_cmds
137 "list:List currently running VMs/containers"
138 "status:Show VM/container status"
139 "show:Show properties of one or more VMs/containers"
140 "terminate:Terminate one or more VMs/containers"
141 "kill:Send signal to process or a VM/container"
143 if (( CURRENT == 1 )); then
144 _describe -t commands 'machinectl command' _machinectl_cmds || compadd "$@"
146 local curcontext="$curcontext"
147 cmd="${${_machinectl_cmds[(r)$words[1]:*]%%:*}}"
150 list) msg="no options" ;;
152 _machines=( "${(foa)$(machinectl list | awk '{print $1}')}" )
153 if [[ -n "$_machines" ]]; then
154 _describe 'machines' _machines
156 _message 'no machines'
160 _message "no more options"
167 #vim: set ft=zsh sw=4 ts=4 et