summaryrefslogtreecommitdiffstats
path: root/bash-completion/lsmem
diff options
context:
space:
mode:
authorSami Kerola2017-07-01 00:13:58 +0200
committerSami Kerola2017-07-15 23:05:42 +0200
commitabbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056 (patch)
treece554d5e4e09146e5df0cfaa6c014afbf9b09357 /bash-completion/lsmem
parentuuidparse: add bash-completion file (diff)
downloadkernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.tar.gz
kernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.tar.xz
kernel-qcow2-util-linux-abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056.zip
bash-completion: make completions to work when bash set -u is in use
User who want to avoid refering to none-existing variables got earlier the following error. $ set -u $ findmnt --output <tab>bash: OUTPUT: unbound variable Here is short explanation of this setting. $ help set -u Treat unset variables as an error when substituting. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'bash-completion/lsmem')
-rw-r--r--bash-completion/lsmem2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash-completion/lsmem b/bash-completion/lsmem
index 85cf3e01a..8f7a46ec3 100644
--- a/bash-completion/lsmem
+++ b/bash-completion/lsmem
@@ -12,7 +12,7 @@ _lsmem_module()
OUTPUT_ALL='RANGE SIZE STATE REMOVABLE BLOCK NODE'
for WORD in $OUTPUT_ALL; do
if ! [[ $prefix == *"$WORD"* ]]; then
- OUTPUT="$WORD $OUTPUT"
+ OUTPUT="$WORD ${OUTPUT:-""}"
fi
done
compopt -o nospace