readline: only keep history for interactive session

This commit is contained in:
Michael Davidsaver authored and Andrew Johnson committed 2024-08-21 09:36:39 -05:00
1 parent 457387ed38
commit 057eb87101
1 file changed
+1 -1
@@ -109,7 +109,7 @@ osdReadline (const char *prompt, struct readlineContext *context)
line[linelen] = '\0';
}
context->line = line;
if (line && *line)
if (line && *line && !context->in)
add_history(line);
return line;
}