7 Bug-Reported-by: HIROSE Masaaki <hirose31@gmail.com>
8 Bug-Reference-ID: <CAGSOfA-RqiTe=+GsXsDKyZrrMWH4bDbXgMVVegMa6OjqC5xbnQ@mail.gmail.com>
9 Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2019-05/msg00038.html
13 Reading history entries with timestamps can result in history entries joined
16 Patch (apply with `patch -p0'):
18 *** ../bash-5.0-patched/lib/readline/histfile.c 2018-06-11 09:14:52.000000000 -0400
19 --- lib/readline/histfile.c 2019-05-16 15:55:57.000000000 -0400
23 has_timestamps = HIST_TIMESTAMP_START (buffer);
24 ! history_multiline_entries += has_timestamps && history_write_timestamps;
26 /* Skip lines until we are at FROM. */
27 for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
28 if (*line_end == '\n')
31 has_timestamps = HIST_TIMESTAMP_START (buffer);
32 ! history_multiline_entries += has_timestamps && history_write_timestamps;
34 /* Skip lines until we are at FROM. */
37 for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
38 if (*line_end == '\n')
42 if (HIST_TIMESTAMP_START(p) == 0)
47 + /* If we are at the last line (current_line == from) but we have
48 + timestamps (has_timestamps), then line_start points to the
49 + text of the last command, and we need to skip to its end. */
50 + if (current_line >= from && has_timestamps)
52 + for (line_end = p; line_end < bufend && *line_end != '\n'; line_end++)
54 + line_start = (*line_end == '\n') ? line_end + 1 : line_end;
59 *** ../bash-5.0/patchlevel.h 2016-06-22 14:51:03.000000000 -0400
60 --- patchlevel.h 2016-10-01 11:01:28.000000000 -0400
63 looks for to find the patch level (for the sccs version string). */
65 ! #define PATCHLEVEL 12
67 #endif /* _PATCHLEVEL_H_ */
69 looks for to find the patch level (for the sccs version string). */
71 ! #define PATCHLEVEL 13
73 #endif /* _PATCHLEVEL_H_ */