commit | 903b24f04197bec266882d2ae5cd752dd88ae74d | [log] [tgz] |
---|---|---|
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Wed Jan 01 14:54:39 2014 +0200 |
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | Wed Jan 01 14:54:39 2014 +0200 |
tree | 88e49f6855b3c420d48bb01375f1ada88cf596b5 | |
parent | 83c437cb0d6a58293ecab799ff3573cc6e267626 [diff] [blame] |
Add readline history support.
diff --git a/unix/main.c b/unix/main.c index 73da1ec..177078f 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 @@ // EOF return; } + add_history(line); if (mp_repl_is_compound_stmt(line)) { for (;;) { char *line2 = readline("... ");