mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-26 05:09:23 +01:00
bashrc: Light green for normal user and red for root, like with zsh.
This commit is contained in:
parent
53a541825b
commit
dab65be727
7
bashrc
7
bashrc
@ -67,6 +67,13 @@ else
|
|||||||
fi
|
fi
|
||||||
unset color_prompt force_color_prompt
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# check if we're root
|
||||||
|
if [[ $EUID == 0 ]]; then
|
||||||
|
PS1='\033[1;31m\u@\h:\w\$\033[0m '
|
||||||
|
else
|
||||||
|
PS1='\033[1;32m\u@\h:\w\$\033[0m '
|
||||||
|
fi
|
||||||
|
|
||||||
# If this is an xterm set the title to user@host:dir
|
# If this is an xterm set the title to user@host:dir
|
||||||
case "$TERM" in
|
case "$TERM" in
|
||||||
xterm*|rxvt*)
|
xterm*|rxvt*)
|
||||||
|
Loading…
Reference in New Issue
Block a user