From 93292f5f461365e68127f9cd18a866e68e8f29ed Mon Sep 17 00:00:00 2001 From: Gerrit Pannek Date: Fri, 3 Nov 2017 08:49:05 +0100 Subject: [PATCH] Add: Different Prompt for user/root --- bashrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bashrc b/bashrc index 69b7b0d..5e8b59f 100644 --- a/bashrc +++ b/bashrc @@ -1,4 +1,10 @@ -PS1='\[\033[0;32m\]me@\h\[\033[0m\] [\[\033[0;33m\]\w\[\]\[\033[0;32m\]] $ \[\033[0m\]' +if [ $UID -eq 0 ] ; then + PROMPT_SUFFIX='\[\033[1;31m\] # \[\033[0m\]' +else + PROMPT_SUFFIX='\[\033[0;32m\] $ \[\033[0m\]' +fi + +PS1='\[\033[0;32m\]me@\h\[\033[0m\] [\[\033[0;33m\]\w\[\]\[\033[0;32m\]]'$PROMPT_SUFFIX export PATH=$PATH:~/bin:~/local/bin function tmux_title {