3 local bright cur prev OPTS
5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
11 for I in /usr/share/terminfo/?/*; do
12 TERM_LIST+="${I##*/} "
14 COMPREPLY=( $(compgen -W "$TERM_LIST" -- $cur) )
17 '--foreground'|'--background')
18 COMPREPLY=( $(compgen -W "black blue cyan default green magenta red white yellow" -- $cur) )
21 '--ulcolor'|'--hbcolor'|'bright')
22 if [ $prev != 'bright' ]; then
23 bright='bright black grey'
27 COMPREPLY=( $(compgen -W "$bright blue cyan green magenta red white yellow" -- $cur) )
30 '--cursor'|'--repeat'|'--appcursorkeys'|'--linewrap'|'--inversescreen'|'--bold'|'--half-bright'|'--blink'|'--reverse'|'--underline'|'--msg')
31 COMPREPLY=( $(compgen -W "off on" -- $cur) )
35 COMPREPLY=( $(compgen -W "all rest" -- $cur) )
39 COMPREPLY=( $(compgen -W "tab1 tab2 tab3 tab160" -- $cur) )
43 COMPREPLY=( $(compgen -W "{1..160}" -- $cur) )
47 COMPREPLY=( $(compgen -W "{0..60} force poke" -- $cur) )
52 NUM_CONS=(/dev/vcsa?*)
53 COMPREPLY=( $(compgen -W "{1..${#NUM_CONS[*]}}" -- $cur) )
59 COMPREPLY=( $(compgen -f -- $cur) )
63 COMPREPLY=( $(compgen -W "{0..8}" -- $cur) )
67 COMPREPLY=( $(compgen -W "on vsync hsync powerdown off" -- $cur) )
71 COMPREPLY=( $(compgen -W "{0..60}" -- $cur) )
75 COMPREPLY=( $(compgen -W "0-2000" -- $cur) )
79 COMPREPLY=( $(compgen -W "freqnumber" -- $cur) )
124 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
127 complete -F _setterm_module setterm