diff --git a/sh/sh.c b/sh/sh.c index 9ea8834b..2b382245 100644 --- a/sh/sh.c +++ b/sh/sh.c @@ -2024,7 +2024,9 @@ void read_command_interactive(struct sh_read_command* sh_read_command) edit_state.complete_context = NULL; edit_state.complete = do_complete; - const char* def_ps1 = "\\033[;1;32m\\u@\\H \\033[1;34m\\w \\$\\033[m "; + const char* def_ps1 = !getuid() ? + "\\033[;1;31m\\u\033[1;33m@\\H \\033[1;34m\\w \\033[1;31m\\$\\033[m " : + "\\033[;1;32m\\u@\\H \\033[1;34m\\w \\$\\033[m "; const char* def_ps2 = "> "; edit_state.ps1 = eval_ps(getenv_safe_def("PS1", def_ps1)); edit_state.ps2 = eval_ps(getenv_safe_def("PS2", def_ps2));