summaryrefslogtreecommitdiff
path: root/src/user/highway
diff options
context:
space:
mode:
authorBenji Dial <benji6283@gmail.com>2021-03-02 20:40:10 -0500
committerBenji Dial <benji6283@gmail.com>2021-03-02 20:40:10 -0500
commite9a11deef01346dc75728f4debefcc694254e5f0 (patch)
treea6e0160775178677823385652877f126a69aed49 /src/user/highway
parent1d69a46f5d9823bbf2e6211ca367b409d2d5f7a7 (diff)
downloadportland-os-e9a11deef01346dc75728f4debefcc694254e5f0.tar.gz
command history in shell
Diffstat (limited to 'src/user/highway')
-rw-r--r--src/user/highway/main.c4
1 files changed, 3 insertions, 1 deletions
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