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>
This commit is contained in:
Andre Wild 2017-09-27 19:44:46 +02:00 committed by Karel Zak
parent 0a4320f5e7
commit afee3f2042
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ _chmem_module()
--disable
--blocks
--verbose
--zone
--help
--version
"

View File

@ -9,7 +9,7 @@ _lsmem_module()
local prefix realcur OUTPUT_ALL OUTPUT
realcur="${cur##*,}"
prefix="${cur%$realcur}"
OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE'
OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE ZONES'
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
OUTPUT="$WORD ${OUTPUT:-""}"