Differentiate shell prompt for root

This commit is contained in:
Kevin Lange 2014-06-05 22:36:03 -07:00
parent 4c199aa6b8
commit 40c399e43a

View File

@ -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);
}