5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 local prefix realcur OUTPUT
11 prefix="${cur%$realcur}"
12 for WORD in "IRQ TOTAL NAME"; do
13 if ! [[ $prefix == *"$WORD"* ]]; then
14 OUTPUT="$WORD ${OUTPUT:-""}"
18 COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- $realcur) )
22 COMPREPLY=( $(compgen -W "irq total name" -- $cur) )
25 '-h'|'--help'|'-V'|'--version')
37 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
40 complete -F _lsirq_module lsirq