summaryrefslogtreecommitdiff
path: root/usr.bin/osh/osh.c
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2025-07-10 02:38:45 -0400
committerIan Moffett <ian@osmora.org>2025-07-10 02:38:45 -0400
commit02e4990d05c881dfd0f40ca1e4d6d28879cfe9af (patch)
treef4673d7b8d4a3928a474fca6b112d90eaa68fde8 /usr.bin/osh/osh.c
parentc9dccc2fa3eca72b65da1ebc4cf817c3c86cf500 (diff)
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 <ian@osmora.org>
Diffstat (limited to 'usr.bin/osh/osh.c')
-rw-r--r--usr.bin/osh/osh.c4
1 files changed, 2 insertions, 2 deletions
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') {