commit bash-20150109 snapshot

This commit is contained in:
Chet Ramey
2015-01-12 11:04:01 -05:00
parent 8f50a0236c
commit 687a967e4a
13 changed files with 1044 additions and 30 deletions
+10
View File
@@ -204,6 +204,12 @@ bash_history_inhibit_expansion (string, i)
char *string;
int i;
{
int t;
char hx[2];
hx[0] = history_expansion_char;
hx[1] = '\0';
/* The shell uses ! as a pattern negation character in globbing [...]
expressions, so let those pass without expansion. */
if (i > 0 && (string[i - 1] == '[') && member (']', string + i + 1))
@@ -220,6 +226,10 @@ bash_history_inhibit_expansion (string, i)
else if (extended_glob && i > 1 && string[i+1] == '(' && member (')', string + i + 2))
return (1);
#endif
/* Make sure the history expansion should not be skipped by quoting or
command/process substitution. */
else if (t = skip_to_delim (string, 0, hx, SD_NOJMP) > 0 && t > i)
return (1);
else
return (0);
}