From e181517de11640ae90a82fad8fa799f9deb48a47 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Tue, 31 Mar 2026 15:57:19 -0700 Subject: [PATCH] readline history, clear before append read_history() appends to the global history array. Clear before each read to prevent duplication. --- modules/libcom/src/iocsh/iocsh.cpp | 1 + 1 file changed, 1 insertion(+) 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(),