mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Color the default root shell prompt red and gold.
This commit is contained in:
parent
538b6e7da9
commit
58b3dd26d5
1 changed files with 3 additions and 1 deletions
4
sh/sh.c
4
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));
|
||||
|
|
Loading…
Add table
Reference in a new issue