readline: only keep history for interactive session

This commit is contained in:
Michael Davidsaver
2024-06-18 14:51:41 -07:00
committed by Andrew Johnson
parent 457387ed38
commit 057eb87101

View File

@ -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;
}