From 46ee0eb937a4a6601a61b6e64576a6975d975800 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 8 Apr 2023 14:47:50 +0200 Subject: [PATCH] sh: Show hashtag on root's prompt --- apps/sh.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/sh.cpp b/apps/sh.cpp index 9da7fbec..b827bbff 100644 --- a/apps/sh.cpp +++ b/apps/sh.cpp @@ -74,7 +74,7 @@ int main(int argc, char** argv) while (1) { - if (file == "-") fputs("sh$ ", stdout); + if (file == "-") fputs(getuid() == 0 ? "sh# " : "sh$ ", stdout); char cmd[4096]; char* rc = fgets(cmd, sizeof(cmd), f);