]> git.ipfire.org Git - thirdparty/systemd.git/blame_incremental - shell-completion/zsh/_systemd
improve zsh completion (#32098)
[thirdparty/systemd.git] / shell-completion / zsh / _systemd
... / ...
CommitLineData
1#compdef systemd-cat systemd-ask-password systemd-cgls systemd-cgtop systemd-detect-virt systemd-machine-id-setup systemd-notify systemd-tty-ask-password-agent
2# SPDX-License-Identifier: LGPL-2.1-or-later
3
4local curcontext="$curcontext" state lstate line
5case "$service" in
6 systemd-ask-password)
7 _arguments \
8 '(- *)'{-h,--help}'[Show this help]' \
9 '--icon=[Icon name]:icon name:' \
10 '--timeout=[Timeout in sec]:timeout (seconds):' \
11 '--no-tty[Ask question via agent even on TTY]' \
12 '--accept-cached[Accept cached passwords]' \
13 '--multiple[List multiple passwords if available]'
14 ;;
15 systemd-cat)
16 _arguments \
17 '(- *)'{-h,--help}'[Show this help]' \
18 '(- *)--version[Show package version.]' \
19 '(-t --identifier)'{-t+,--identifier=}'[Set syslog identifier.]:syslog identifier:' \
20 '(-p --priority)'{-p+,--priority=}'[Set priority value.]:value:({0..7})' \
21 '--level-prefix=[Control whether level prefix shall be parsed.]:boolean:(1 0)' \
22 '--namespace=[Connect to specified journal namespace.]:journal namespace:' \
23 ':Message'
24 ;;
25 systemd-cgls)
26 _arguments \
27 '(- *)'{-h,--help}'[Show this help]' \
28 '(- *)--version[Show package version]' \
29 '--no-pager[Do not pipe output into a pager]' \
30 '(-a --all)'{-a,--all}'[Show all groups, including empty]' \
31 '-k[Include kernel threads in output]' \
32 ':cgroups:(cpuset cpu cpuacct memory devices freezer blkio)'
33 ;;
34 systemd-cgtop)
35 _arguments \
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)'{-d+,--delay=}'[Specify delay]:delay:' \
44 '(-n --iterations)'{-n+,--iterations=}'[Run for N iterations before exiting]:number of iterations:' \
45 '(-b --batch)'{-b,--batch}'[Run in batch mode, accepting no input]' \
46 '--depth=[Maximum traversal depth]:maximum depth:'
47 ;;
48 systemd-detect-virt)
49 _arguments \
50 '(-)'{-h,--help}'[Show this help]' \
51 '(-)--version[Show package version]' \
52 '(-c --container)'{-c,--container}'[Only detect whether we are run in a container]' \
53 '(-v --vm)'{-v,--vm}'[Only detect whether we are run in a VM]' \
54 '(-q --quiet)'{-q,--quiet}"[Don't output anything, just set return value]"
55 ;;
56 systemd-machine-id-setup)
57 _arguments \
58 '(-)'{-h,--help}'[Show this help]' \
59 '(-)--version[Show package version]'
60 ;;
61 systemd-notify)
62 _arguments \
63 '(-)'{-h,--help}'[Show this help]' \
64 '(-)--version[Show package version]' \
65 '--ready[Inform the init system about service start-up completion.]' \
66 '--pid=[Inform the init system about the main PID of the daemon]:daemon main PID:_pids' \
67 '--status=[Send a free-form status string for the daemon to the init systemd]:status string:' \
68 '--booted[Returns 0 if the system was booted up with systemd]'
69 ;;
70 systemd-tty-ask-password-agent)
71 _arguments \
72 '(-)'{-h,--help}'[Prints a short help text and exits.]' \
73 '(-)--version[Prints a short version string and exits.]' \
74 '--list[Lists all currently pending system password requests.]' \
75 '--query[Process all currently pending system password requests by querying the user on the calling TTY.]' \
76 '--watch[Continuously process password requests.]' \
77 '--wall[Forward password requests to wall(1).]' \
78 '--plymouth[Ask question with plymouth(8).]' \
79 '--console[Ask question on /dev/console.]'
80 ;;
81 *) _message 'eh?' ;;
82esac