+/* Add LINE to the history list, handling possibly multi-line compound
+ commands. We note whether or not we save the first line of each command
+ (which is usually the entire command and history entry), and don't add
+ the second and subsequent lines of a multi-line compound command if we
+ didn't save the first line. We don't usually save shell comment lines in
+ compound commands in the history, because they could have the effect of
+ commenting out the rest of the command when the entire command is saved as
+ a single history entry (when COMMAND_ORIENTED_HISTORY is enabled). If
+ LITERAL_HISTORY is set, we're saving lines in the history with embedded
+ newlines, so it's OK to save comment lines. If we're collecting the body
+ of a here-document, we should act as if literal_history is enabled, because
+ we want to save the entire contents of the here-document as it was
+ entered. We also make sure to save multiple-line quoted strings or other
+ constructs. */
+void
+maybe_add_history (line)
+ char *line;
+{
+ hist_last_line_added = 0;