1
0
mirror of https://github.com/systemd/systemd synced 2024-07-09 04:26:06 +00:00
systemd/shell-completion/zsh/_oomctl
Zbigniew Jędrzejewski-Szmek 0923b4253c tree-wide: replace "plural(s)" by "plurals"
(s) is just ugly with a vibe of DOS. In most cases just using the normal plural
form is more natural and gramatically correct.

There are some log_debug() statements left, and texts in foreign licenses or
headers. Those are not touched on purpose.
2022-10-17 15:10:53 +02:00

29 lines
856 B
Plaintext

#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 cgroups and system contexts"
"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'