Differentiate shell prompt for root
This commit is contained in:
parent
4c199aa6b8
commit
40c399e43a
@ -206,7 +206,7 @@ void draw_prompt(int ret) {
|
||||
}
|
||||
/* Print the working directory in there, too */
|
||||
getcwd(cwd, 1024);
|
||||
printf("\033[0m%s\033[1;38;5;47m$\033[0m ", cwd);
|
||||
printf("\033[0m%s%s\033[0m ", cwd, getuid() == 0 ? "\033[1;38;5;196m#" : "\033[1;38;5;47m$");
|
||||
fflush(stdout);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user