5 cur="${COMP_WORDS[COMP_CWORD]}"
6 prev="${COMP_WORDS[COMP_CWORD-1]}"
9 local prefix realcur OPTS
12 prefix="${cur%$realcur}"
13 OPTS_ALL="CPU CORE SOCKET NODE
14 BOOK DRAWER CACHE POLARIZATION ADDRESS
15 CONFIGURED ONLINE MAXMHZ MINMHZ"
16 for WORD in $OPTS_ALL; do
17 if ! [[ $prefix == *"$WORD"* ]]; then
18 OPTS="$WORD ${OPTS:-""}"
22 COMPREPLY=( $(compgen -P "$prefix" -W "$OPTS" -S ',' -- $realcur) )
25 '-h'|'--help'|'-V'|'--version')
45 COMPREPLY=( $(compgen -W "${OPTS_ALL[*]}" -- $cur) )
51 COMPREPLY=( $(compgen -f -- $cur) )
54 complete -F _lscpu_module lscpu