change to behavior of '&' in pattern substitution replacement string; fix for blank lines in multiline commands saved in command history

This commit is contained in:
Chet Ramey
2022-01-18 10:59:53 -05:00
parent 5e6f45d9b1
commit 2a1c81bf63
31 changed files with 1596 additions and 1312 deletions
+4 -1
View File
@@ -5433,8 +5433,11 @@ history_delimiting_chars (line)
return (" ");
}
/* Assume that by this point we are reading lines in a multi-line command.
If we have multiple consecutive blank lines we want to return only one
semicolon. */
if (line_isblank (line))
return ("");
return (current_command_line_count > 1 && last_read_token == '\n' && token_before_that != '\n') ? "; " : "";
return ("; ");
}