mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-21 12:11:26 +01:00
24 lines
455 B
Text
24 lines
455 B
Text
|
#compdef ionice
|
||
|
|
||
|
local context state line
|
||
|
typeset -A opt_args
|
||
|
|
||
|
_arguments \
|
||
|
'(* -)-h[display usage information]' \
|
||
|
'-p[interpret args as process ID]' \
|
||
|
'-c[scheduling class]:class:(( 1\:realtime 2\:best-effort 3\:idle ))' \
|
||
|
'-n[scheduling class priority]:class-pririty:((
|
||
|
0\:high\ priority
|
||
|
{1..6}\:
|
||
|
7\:low\ priority
|
||
|
))' \
|
||
|
'*::command or pid:->cmd_or_pid' \
|
||
|
&& return 0
|
||
|
|
||
|
if (( $+opt_args[-p] ))
|
||
|
then
|
||
|
_pids
|
||
|
else
|
||
|
_normal
|
||
|
fi
|