commit bash-20140110 snapshot

This commit is contained in:
Chet Ramey
2014-01-16 14:30:22 -05:00
parent 67440bc595
commit bb579650a5
141 changed files with 45148 additions and 18723 deletions
+29 -3
View File
@@ -96,6 +96,8 @@ extern int errno;
#define RBRACE '}'
#define LPAREN '('
#define RPAREN ')'
#define LBRACK '['
#define RBRACK ']'
#if defined (HANDLE_MULTIBYTE)
#define WLPAREN L'('
@@ -1809,6 +1811,20 @@ skip_to_delim (string, start, delims, flags)
continue;
}
#endif
else if ((flags & SD_GLOB) && c == LBRACK)
{
si = i + 1;
if (string[si] == '\0')
CQ_RETURN(si);
temp = extract_delimited_string (string, &si, LBRACK, LBRACK, RBRACK, SX_NOALLOC); /* ) */
i = si;
if (string[i] == '\0') /* don't increment i past EOS in loop */
break;
i++;
continue;
}
else if ((skipquote || invert) && (member (c, delims) == 0))
break;
else
@@ -7404,7 +7420,13 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
ret = alloc_word_desc ();
ret->word = temp1;
if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
/* We test quoted_dollar_atp because we want variants with double-quoted
"$@" to take a different code path. In fact, we make sure at the end
of expand_word_internal that we're only looking at these flags if
quoted_dollar_at == 0. */
if (temp1 &&
(quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
return ret;
}
@@ -7422,7 +7444,9 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
ret = alloc_word_desc ();
ret->word = temp1;
if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
if (temp1 &&
(quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
return ret;
}
@@ -7441,7 +7465,9 @@ parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, conta
ret = alloc_word_desc ();
ret->word = temp1;
if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
if (temp1 &&
(quoted_dollar_atp == 0 || *quoted_dollar_atp == 0) &&
QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
return ret;
}