Skip to content
Snippets Groups Projects
Commit 903b24f0 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

Add readline history support.

parent 83c437cb
Branches
Tags
No related merge requests found
......@@ -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("... ");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment