diff --git a/modules/libcom/src/iocsh/iocsh.cpp b/modules/libcom/src/iocsh/iocsh.cpp index 37658c8f9..3182a57b2 100644 --- a/modules/libcom/src/iocsh/iocsh.cpp +++ b/modules/libcom/src/iocsh/iocsh.cpp @@ -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(),