From 903b24f04197bec266882d2ae5cd752dd88ae74d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Wed, 1 Jan 2014 14:54:39 +0200 Subject: [PATCH] Add readline history support. --- unix/main.c | 2 ++ 1 file changed, 2 insertions(+) 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 +#include 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("... ");