From fadd46012c9974931add6c36e69636d3cbc6906f Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Sun, 20 Sep 2020 14:50:12 -0400 Subject: history when getting line from user in knob --- src/user/highway/main.c | 3 ++- 1 file changed, 2 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 61f736e..4599315 100644 --- a/src/user/highway/main.c +++ b/src/user/highway/main.c @@ -7,10 +7,11 @@ void main(const char *arg) { source(*arg ? arg : "user/default.rc"); char cmd_buf[128]; yield_task(); + struct history *cmd_hs = new_history(128); tell_user_sz("Portland Highway\nType \"help\" for help.\n"); while (1) { tell_user_sz("\n> "); - ask_user_line_sz(cmd_buf, 127); + ask_user_line_sz_with_history(cmd_buf, 127, cmd_hs); run_line(cmd_buf); } } \ No newline at end of file -- cgit v1.2.3