From 02e4990d05c881dfd0f40ca1e4d6d28879cfe9af Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Thu, 10 Jul 2025 02:38:45 -0400 Subject: usr: osh: Write current user to prompt Previosuly, this was fixed to "root" but now that we allow multiple users it would be best to make this dynamic. Signed-off-by: Ian Moffett --- usr.bin/osh/osh.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/osh/osh.c b/usr.bin/osh/osh.c index 0bce357..5bcd2e2 100644 --- a/usr.bin/osh/osh.c +++ b/usr.bin/osh/osh.c @@ -60,7 +60,7 @@ "clear - Clear the screen\n" \ "exit - Exit the shell" -#define PROMPT "[root::osmora]~ " +#define PROMPT "[%s::osmora]~ " static char buf[64]; static uint8_t buf_i; @@ -394,7 +394,7 @@ main(int argc, char **argv) puts(WELCOME); while (running) { memset(prog_argv, 0, sizeof(prog_argv)); - fputs(PROMPT, stdout); + printf(PROMPT, getlogin()); input = getstr(); if (input[0] == '\0') { -- cgit v1.2.3