mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-06 02:02:42 +02:00
commit bash-20150109 snapshot
This commit is contained in:
+10
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user