fix history expansion to not perform quick substitution on a new line that's part of a quoted string; save the value of $_ around prompt string decoding

This commit is contained in:
Chet Ramey
2023-12-19 09:56:34 -05:00
parent 9d51df7546
commit aa2d23cfac
24 changed files with 1973 additions and 1779 deletions
+2 -4
View File
@@ -418,9 +418,7 @@ check_mail (void)
int i, use_user_notification;
char *dollar_underscore, *temp;
dollar_underscore = get_string_value ("_");
if (dollar_underscore)
dollar_underscore = savestring (dollar_underscore);
dollar_underscore = save_lastarg ();
for (i = 0; i < mailfiles_count; i++)
{
@@ -481,7 +479,7 @@ check_mail (void)
if (dollar_underscore)
{
bind_variable ("_", dollar_underscore, 0);
bind_lastarg (dollar_underscore);
free (dollar_underscore);
}
else