Blame SOURCES/bash-4.2-brace-expand.patch
|
|
ff19ae |
diff --git a/braces.c b/braces.c
|
|
|
ff19ae |
index 2febed7..61c1ab1 100644
|
|
|
ff19ae |
--- a/braces.c
|
|
|
ff19ae |
+++ b/braces.c
|
|
|
ff19ae |
@@ -529,6 +529,11 @@ brace_gobbler (text, tlen, indx, satisfy)
|
|
|
ff19ae |
{
|
|
|
ff19ae |
if (c == quoted)
|
|
|
ff19ae |
quoted = 0;
|
|
|
ff19ae |
+#if defined (SHELL)
|
|
|
ff19ae |
+ /* The shell allows quoted command substitutions */
|
|
|
ff19ae |
+ if (quoted == '"' && c == '$' && text[i+1] == '(') /*)*/
|
|
|
ff19ae |
+ goto comsub;
|
|
|
ff19ae |
+#endif
|
|
|
ff19ae |
ADVANCE_CHAR (text, tlen, i);
|
|
|
ff19ae |
continue;
|
|
|
ff19ae |
}
|
|
|
ff19ae |
@@ -551,6 +556,7 @@ brace_gobbler (text, tlen, indx, satisfy)
|
|
|
ff19ae |
/* Pass new-style command and process substitutions through unchanged. */
|
|
|
ff19ae |
if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(') /* ) */
|
|
|
ff19ae |
{
|
|
|
ff19ae |
+comsub:
|
|
|
ff19ae |
si = i + 2;
|
|
|
ff19ae |
t = extract_command_subst (text, &si, 0);
|
|
|
ff19ae |
i = si;
|