Commit 903b24f0 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Add readline history support.

parent 83c437cb
......@@ -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("... ");
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment