From abbcec4fc9c8d7fb835b4eafd1bc9d82acbf0056 Mon Sep 17 00:00:00 2001 From: Sami Kerola Date: Fri, 30 Jun 2017 23:13:58 +0100 Subject: 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 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 --- bash-completion/losetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash-completion/losetup') diff --git a/bash-completion/losetup b/bash-completion/losetup index 7fee1d0ae..b58d8de94 100644 --- a/bash-completion/losetup +++ b/bash-completion/losetup @@ -33,7 +33,7 @@ _losetup_module() SIZELIMIT DIO" for WORD in $OUTPUT_ALL; do if ! [[ $prefix == *"$WORD"* ]]; then - OUTPUT="$WORD $OUTPUT" + OUTPUT="$WORD ${OUTPUT:-""}" fi done compopt -o nospace -- cgit v1.2.3-55-g7522