From 4decbbbe5c4249052f5361e53b1dfaddc1aca4fc Mon Sep 17 00:00:00 2001 From: Sage Vaillancourt Date: Tue, 15 Mar 2022 22:47:46 -0400 Subject: [PATCH] Use readline history. --- src/pebblisp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pebblisp.c b/src/pebblisp.c index 10e14e6..95566b6 100644 --- a/src/pebblisp.c +++ b/src/pebblisp.c @@ -1050,11 +1050,13 @@ Object systemCall(Object process, Object _, struct Environment* env) void repl(struct Environment* env) { char* buf; + using_history(); while ((buf = readline("pebblisp::> ")) != NULL) { if (strcmp("q", buf) == 0) { free(buf); break; } + add_history(buf); Object o = parseEval(buf, env); printObj(&o); free(buf);