readline history, clear before append
read_history() appends to the global history array. Clear before each read to prevent duplication.
This commit is contained in:
1 parent
4dfd5c7694
commit
e181517de1
1 file changed
+1
@@ -643,6 +643,7 @@ struct ReadlineContext {
|
||||
rl_bind_key('\t', rl_complete);
|
||||
compute_hist_file();
|
||||
if(!hist_file.empty()) {
|
||||
clear_history(); // clear as read_history() will append
|
||||
if(int err = read_history(hist_file.c_str())) {
|
||||
if(err!=ENOENT)
|
||||
fprintf(epicsGetStderr(),
|
||||
|
||||
Reference in new issue
Block a user