Archived
1
0
Fork 0
This repository has been archived on 2024-01-27. You can view files and clone it, but cannot push or open issues or pull requests.
dockerfiles/toolbox/assets/profile.d/color-prompt.sh
J. Elfring 06ce14aae7 Fix toolbox:
color-prompt.sh is no longer there by default.
2021-07-03 00:19:05 +02:00

11 lines
296 B
Bash

# Setup a red prompt for root and a green one for users.
# rename this file to color_prompt.sh to actually enable it
NORMAL="\[\e[0m\]"
RED="\[\e[1;31m\]"
GREEN="\[\e[1;32m\]"
if [ "$USER" = root ]; then
PS1="$RED\h [$NORMAL\w$RED]# $NORMAL"
else
PS1="$GREEN\h [$NORMAL\w$GREEN]\$ $NORMAL"
fi