]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/chrt
logger: make socket initialization in main() more readable
[thirdparty/util-linux.git] / bash-completion / chrt
CommitLineData
18b0017a
SK
1_chrt_module()
2{
3 local cur OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 # FIXME: -p is ambiguous, it takes either pid or priority as an
7 # argument depending on whether user wanted to get or set the
8 # values. Perhaps the command interface should be reconsidered.
9 case $cur in
10 -*)
11 OPTS="-b --batch
12 -f --fifo
13 -i --idle
14 -o --other
15 -r --rr
16 -R --reset-on-fork
17 -a --all-tasks
18 -h --help
19 -m --max
20 -p --pid
21 -v --verbose
22 -V --version"
23 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
24 return 0
25 ;;
26 esac
27 local PIDS
28 PIDS=$(for I in /proc/[0-9]*; do echo ${I##"/proc/"}; done)
29 COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
30 return 0
31}
32complete -F _chrt_module chrt