From 60b66c6454e7d05c47b3722d3c756540a7aee381 Mon Sep 17 00:00:00 2001 From: Lizzy Fleckenstein Date: Tue, 19 Dec 2023 04:55:36 +0100 Subject: uname command --- stage3/shell.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'stage3/shell.c') diff --git a/stage3/shell.c b/stage3/shell.c index 244a247..b0e1fce 100644 --- a/stage3/shell.c +++ b/stage3/shell.c @@ -158,6 +158,16 @@ static void cmd_love(str arg) } } +extern str version; + +static void cmd_uname(str arg) +{ + (void) arg; + print(S("cuddles ")); + print(version); + print(S("\n")); +} + typedef struct { str name; void (*fn)(str arg); @@ -174,6 +184,7 @@ static command registry[] = { { S("loadkeys"), &cmd_loadkeys }, { S("clear"), &cmd_clear }, { S("love"), &cmd_love }, + { S("uname"), &cmd_uname }, }; void shell_run_cmd(str cmd) -- cgit v1.2.3