Files
systemd/shell-completion/zsh/_oomctl
T

29 lines
868 B
Plaintext
Raw Normal View History

2022-03-18 14:41:42 +05:30
#compdef oomctl
# SPDX-License-Identifier: LGPL-2.1-or-later
(( $+functions[_oomctl_commands] )) || _oomctl_commands()
{
local -a _oomctl_cmds
_oomctl_cmds=(
2022-10-15 16:06:20 +02:00
"dump:Show the current state of cgroups and system contexts"
2022-03-18 14:41:42 +05:30
"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 \
2024-04-15 17:58:48 +09:00
'(- *)'{-h,--help}'[Prints a short help text and exits.]' \
'(- *)--version[Prints a short version string and exits.]' \
2022-03-18 14:41:42 +05:30
'--no-pager[Do not pipe output into a pager]' \
'*::oomctl command:_oomctl_commands'