5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 local prefix realcur OUTPUT_ALL OUTPUT
11 prefix="${cur%$realcur}"
12 OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE ZONES'
13 for WORD in $OUTPUT_ALL; do
14 if ! [[ $prefix == *"$WORD"* ]]; then
15 OUTPUT="$WORD ${OUTPUT:-""}"
19 COMPREPLY=( $(compgen -P "$prefix" -W "$OUTPUT" -S ',' -- "$realcur") )
25 COMPREPLY=( $(compgen -o dirnames -- ${cur:-"/"}) )
29 COMPREPLY=( $(compgen -W "never always only" -- $cur) )
32 '-h'|'--help'|'-V'|'--version')
50 COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
53 complete -F _lsmem_module lsmem