]> git.ipfire.org Git - thirdparty/bash.git/commitdiff
Bash-5.0 patch 14: edit-and-execute-command does not handle empty command lines
authorChet Ramey <chet.ramey@case.edu>
Fri, 7 Feb 2020 20:18:41 +0000 (15:18 -0500)
committerChet Ramey <chet.ramey@case.edu>
Fri, 7 Feb 2020 20:18:41 +0000 (15:18 -0500)
bashline.c
patchlevel.h

index 824ea9d93996cacfecd7a99e9b2e57e5c90a47d1..97adaa0fa37449f07cd27eeee325150df0c84c5e 100644 (file)
@@ -961,11 +961,8 @@ edit_and_execute_command (count, c, editing_mode, edit_command)
       /* This breaks down when using command-oriented history and are not
         finished with the command, so we should not ignore the last command */
       using_history ();
-      if (rl_line_buffer[0])
-       {
-         current_command_line_count++; /* for rl_newline above */
-         bash_add_history (rl_line_buffer);
-       }
+      current_command_line_count++;    /* for rl_newline above */
+      bash_add_history (rl_line_buffer);
       current_command_line_count = 0;  /* for dummy history entry */
       bash_add_history ("");
       history_lines_this_session++;
index 779671cd9539de449a01a1c33ea7017b611261dc..09a3cc844c2a1020d695d3b0246277bbab37cb21 100644 (file)
@@ -25,6 +25,6 @@
    regexp `^#define[   ]*PATCHLEVEL', since that's what support/mkversion.sh
    looks for to find the patch level (for the sccs version string). */
 
-#define PATCHLEVEL 13
+#define PATCHLEVEL 14
 
 #endif /* _PATCHLEVEL_H_ */