5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 COMPREPLY=( $(compgen -W "{0..3} none realtime best-effort idle" -- $cur) )
13 COMPREPLY=( $(compgen -W "{0..7}" -- $cur) )
18 PGID="$(awk '{print $5}' /proc/*/stat 2>/dev/null | sort -u)"
19 COMPREPLY=( $(compgen -W "$PGID" -- $cur) )
24 PIDS=$(for I in /proc/[0-9]*; do echo ${I##"/proc/"}; done)
25 COMPREPLY=( $(compgen -W "$PIDS" -- $cur) )
30 UIDS="$(stat --format='%u' /proc/[0-9]* | sort -u)"
31 COMPREPLY=( $(compgen -W "$UIDS" -- $cur) )
34 '-h'|'--help'|'-V'|'--version')
40 OPTS="--class --classdata --pid --pgid --ignore --uid --version --help"
41 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
47 COMPREPLY=( $(compgen -f -- $cur) )
50 complete -F _ionice_module ionice