Reproducer steps :

> PROMPT_COMMAND="history -a; history -c; history -n"
> history

Actual output :
    2  history

Expected output:
  All the older history items from bash history file should be re-read.

I am providing a test patch that resolves this issue.

-- 
--
Siteshwar Vashisht
diff --git a/bashhist.c b/bashhist.c
index 9979f99..5ccf9db 100644
--- a/bashhist.c
+++ b/bashhist.c
@@ -332,7 +332,7 @@ bash_clear_history ()
 {
   clear_history ();
   history_lines_this_session = 0;
-  /* XXX - reset history_lines_read_from_file? */
+  history_lines_in_file = history_lines_read_from_file = 0;
 }
 
 /* Delete and free the history list entry at offset I. */

Reply via email to