util-linux/bash-completion/chmem
Andre Wild afee3f2042 lsmem/chmem: add memory zone awareness to bash-completion
This patch extends the valid --output values with ZONES for the
lsmem bash-completion, and adds the --zone option for the chmem
bash-completion.

Signed-off-by: Andre Wild <wild@linux.vnet.ibm.com>
Signed-off-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
2017-10-20 12:37:04 +02:00

31 lines
501 B
Plaintext

_chmem_module()
{
local cur prev OPTS
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
case $prev in
'-h'|'--help'|'-V'|'--version')
return 0
;;
esac
case $cur in
-*)
OPTS="
--enable
--disable
--blocks
--verbose
--zone
--help
--version
"
COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) )
return 0
;;
esac
COMPREPLY=( $(compgen -W "size range blockrange" -- $cur) )
return 0
}
complete -F _chmem_module chmem