bash-completion.sh: local variables v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Thu, 15 Dec 2022 21:43:59 +0100
branchv_0
changeset 8 9f89ecc071bf
parent 7 68b93b82f1cc
child 9 2f116bd15f27
bash-completion.sh: local variables
bash-completion.sh
--- a/bash-completion.sh	Sat Apr 30 23:22:48 2022 +0200
+++ b/bash-completion.sh	Thu Dec 15 21:43:59 2022 +0100
@@ -22,13 +22,13 @@
 	w2=${COMP_WORDS[COMP_CWORD-2]}
 	w3=${COMP_WORDS[COMP_CWORD-3]}
 
-	DATA_TYPE=(
+	local DATA_TYPE=(
 		"string"
 		"integer"
 		"boolean"
 	)
 
-	BOOLEAN_VALUES=(
+	local BOOLEAN_VALUES=(
 		"true"
 		"false"
 	)
@@ -37,7 +37,7 @@
 	elif [[ "$w1" == "--unlink-on-close"                                ]];    then COMPREPLY=($(compgen -W "${BOOLEAN_VALUES[*]}" -- "$w0"))
 	elif [[ "$w1" == "--queue"                         && "x$w0" == "x" ]];    then COMPREPLY=("''")
 	else
-		OPTIONS=(
+		local OPTIONS=(
 			"--relation"
 			"--unlink-on-close"
 			"--queue"