From e9a11deef01346dc75728f4debefcc694254e5f0 Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Tue, 2 Mar 2021 20:40:10 -0500 Subject: command history in shell --- src/user/highway/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/user/highway/main.c') diff --git a/src/user/highway/main.c b/src/user/highway/main.c index 47f3985..bcc3e01 100644 --- a/src/user/highway/main.c +++ b/src/user/highway/main.c @@ -14,9 +14,11 @@ void main(const char *arg) { term_add_sz("Portland Highway\nType \"help\" for help.\n"); term_paint(); + struct history *h = new_history(200); + char cmd_buf[128]; while (1) { - read_line(cmd_buf, 127, "> "); + read_line(cmd_buf, 127, "> ", h); run_line(cmd_buf); } } \ No newline at end of file -- cgit v1.2.3