forked from adamlaska/systemd
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path_oomctl
More file actions
28 lines (26 loc) · 864 Bytes
/
_oomctl
File metadata and controls
28 lines (26 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#compdef oomctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_oomctl_commands] )) || _oomctl_commands()
{
local -a _oomctl_cmds
_oomctl_cmds=(
"dump:Show the current state of the cgroup(s) and system context(s)"
"help:Prints a short help text and exits."
)
if (( CURRENT == 1 )); then
_describe -t commands 'oomctl command' _oomctl_cmds
else
local curcontext="$curcontext"
cmd="${${_oomctl_cmds[(r)$words[1]:*]%%:*}}"
if (( $+functions[_oomctl_$cmd] )); then
_oomctl_$cmd
else
_message "no more options"
fi
fi
}
_arguments \
{-h,--help}'[Prints a short help text and exits.]' \
'--version[Prints a short version string and exits.]' \
'--no-pager[Do not pipe output into a pager]' \
'*::oomctl command:_oomctl_commands'