5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 # Priority range is -1 to 32767. Perhaps these
11 COMPREPLY=( $(compgen -W "$(echo {-1..9} 32767)" -- $cur) )
15 # FIXME: how to append to a string with compgen?
17 OUTPUT="NAME TYPE SIZE USED PRIO"
19 COMPREPLY=( $(compgen -W "$OUTPUT" -S ',' -- $cur) )
22 '-h'|'--help'|'-V'|'--version')
41 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
45 # FIXME: compgen will split SPEC= from '=' point. The append
46 # comma separated value problem is very similar.
48 COMPREPLY=( $(compgen -f -- $cur) )
51 complete -F _swapon_module swapon