Hi,
Here is a (hopefully obvious) patch against bash-3.0 to fix history
handling. The 'current line' (i.e. saved_line_for_history) was being
overwritten each time the user presses the up arrow.
Tim.
*/
--- bash-3.0/lib/readline/misc.c.history 2004-08-26 13:17:22.490788104
+0100
+++ bash-3.0/lib/readline/misc.c 2004-08-26 13:17:23.456601151 +0100
@@ -276,7 +276,7 @@
_rl_saved_line_for_history->line = savestring (rl_line_buffer);
_rl_saved_line_for_history->data = (char *)rl_undo_list;
}
- else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line) == 0)
+ else if (STREQ (rl_line_buffer, _rl_saved_line_for_history->line))
{
free (_rl_saved_line_for_history->line);
_rl_saved_line_for_history->line = savestring (rl_line_buffer);