]> git.ipfire.org Git - thirdparty/util-linux.git/blame - bash-completion/choom
rev: be careful with close()
[thirdparty/util-linux.git] / bash-completion / choom
CommitLineData
8fa223da
KZ
1_choom_module()
2{
3 local cur prev OPTS
4 COMPREPLY=()
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
7 case $prev in
8 '-n'|'--adjust')
9 COMPREPLY=( $(compgen -W "{-1000..1000}" -- $cur) )
10 return 0
11 ;;
12 '-p'|'--pid')
13 local PIDS
14 PIDS=$(cd /proc && echo [0-9]*)
15 COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
16 return 0
17 ;;
18 '-h'|'--help'|'-V'|'--version')
19 return 0
20 ;;
21 esac
22 OPTS="--adjust
23 --pid
24 --help
25 --version"
26 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
27 return 0
28}
29complete -F _choom_module choom