]>
Commit | Line | Data |
---|---|---|
18b0017a SK |
1 | _chrt_module() |
2 | { | |
d4f9b8d7 | 3 | local cur prev OPTS |
18b0017a SK |
4 | COMPREPLY=() |
5 | cur="${COMP_WORDS[COMP_CWORD]}" | |
d4f9b8d7 VS |
6 | prev="${COMP_WORDS[COMP_CWORD-1]}" |
7 | case $prev in | |
8 | '-h'|'--help'|'-V'|'--version') | |
9 | return 0 | |
10 | ;; | |
0fc63d38 SK |
11 | '-T'|'--sched-runtime'|'-P'|'--sched-period'|'-D'|'--sched-deadline') |
12 | COMPREPLY=( $(compgen -W "nanoseconds" -- $cur) ) | |
13 | return 0 | |
14 | ;; | |
d4f9b8d7 | 15 | esac |
18b0017a SK |
16 | case $cur in |
17 | -*) | |
0fc63d38 | 18 | OPTS=" |
0d5b9b8a | 19 | --all-tasks |
0fc63d38 SK |
20 | --batch |
21 | --deadline | |
22 | --fifo | |
0d5b9b8a | 23 | --help |
0fc63d38 | 24 | --idle |
0d5b9b8a | 25 | --max |
0fc63d38 | 26 | --other |
0d5b9b8a | 27 | --pid |
0fc63d38 SK |
28 | --reset-on-fork |
29 | --rr | |
30 | --sched-deadline | |
31 | --sched-period | |
32 | --sched-runtime | |
0d5b9b8a | 33 | --verbose |
0fc63d38 SK |
34 | --version |
35 | " | |
18b0017a SK |
36 | COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) |
37 | return 0 | |
38 | ;; | |
39 | esac | |
0fc63d38 SK |
40 | local i |
41 | for i in ${COMP_WORDS[*]}; do | |
42 | case $i in | |
43 | '-p'|'--pid') | |
44 | COMPREPLY=( $(compgen -W "$(cd /proc && echo [0-9]*)" -- $cur) ) | |
45 | return 0 | |
46 | ;; | |
47 | esac | |
48 | done | |
49 | COMPREPLY=( $(compgen -c -- $cur) ) | |
18b0017a SK |
50 | return 0 |
51 | } | |
52 | complete -F _chrt_module chrt |