summaryrefslogtreecommitdiffstatshomepage
path: root/unix/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'unix/main.c')
-rw-r--r--unix/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/unix/main.c b/unix/main.c
index 73da1ecfc2..177078fa32 100644
--- a/unix/main.c
+++ b/unix/main.c
@@ -16,6 +16,7 @@
#include "repl.h"
#include <readline/readline.h>
+#include <readline/history.h>
static char *str_join(const char *s1, int sep_char, const char *s2) {
int l1 = strlen(s1);
@@ -38,6 +39,7 @@ static void do_repl(void) {
// EOF
return;
}
+ add_history(line);
if (mp_repl_is_compound_stmt(line)) {
for (;;) {
char *line2 = readline("... ");