fix for adding here-documents to history; change to checking for custom LS_COLORS prefix

This commit is contained in:
Chet Ramey
2021-12-09 15:31:21 -05:00
parent 71a11dbeb4
commit e93bed95a8
5 changed files with 24 additions and 33 deletions
+1 -1
View File
@@ -892,7 +892,7 @@ bash_add_history (line)
(current_command_line_count > 2)
don't add a newline here. This will also take care of the literal_history
case if the other conditions are met. */
if ((parser_state & PST_HEREDOC) && current_command_line_count > 2 && line[strlen (line) - 1] == '\n')
if ((parser_state & PST_HEREDOC) && here_doc_first_line == 0 && line[strlen (line) - 1] == '\n')
chars_to_add = "";
else if (current_command_line_count == current_command_line_comment+1)
chars_to_add = "\n";