Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

display red and # for root

  • Loading branch information...
commit 88383878f0fe2fbce13d89ae291f755cdd3930e5 1 parent edf4971
Austin Matzko authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 load.sh
View
8 load.sh
@@ -1,6 +1,12 @@
source ~/.bash_scripts/git-completion.sh
# colors with git repo info
-PS1='\h:\w\[\033[32m\]$(__git_ps1) \[\033[0m\]$ '
+# test for root
+if [ $(id -u) -eq 0 ];
+then
+ PS1='\[\033[31m\](\u)\[\033[0m\] $\h:\w\[\033[32m\]$(__git_ps1) \[\033[0m\]# '
+else
+ PS1='\h:\w\[\033[32m\]$(__git_ps1) \[\033[0m\]$ '
+fi
export TERM=xterm-256color
Please sign in to comment.
Something went wrong with that request. Please try again.