From 8947c4c99f4c1ad92f23e59e84b224cf35e4ff81 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Fri, 15 Jul 2016 00:34:48 +1200 Subject: Quote expansions within parameter expansions I made the incorrect assumption that it was safe not to do this; expansions that include glob characters, for example, can cause problems. --- bash/bashrc.d/vared.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bash/bashrc.d/vared.bash') diff --git a/bash/bashrc.d/vared.bash b/bash/bashrc.d/vared.bash index 940b0900..510631ca 100644 --- a/bash/bashrc.d/vared.bash +++ b/bash/bashrc.d/vared.bash @@ -25,7 +25,7 @@ vared() { fi local name for name ; do - IFS= read -e -i "${!name}" -p "${prompt:-$name=}" -r -- "$name" + IFS= read -e -i "${!name}" -p "${prompt:-"$name"=}" -r -- "$name" done } complete -A variable vared -- cgit v1.2.3