about summary refs log tree commit diff
path: root/Completion/Linux/Command/_ionice
blob: 7a4060341677cdc85b0b01daa1890f87fbaea184 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#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