diff options
Diffstat (limited to 'myconfig.sh')
-rwxr-xr-x | myconfig.sh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/myconfig.sh b/myconfig.sh index e0ebd69..7f3a5dc 100755 --- a/myconfig.sh +++ b/myconfig.sh @@ -9,7 +9,12 @@ # git completion and custom PS1 source /usr/share/git/completion/git-prompt.sh GIT_PS1_SHOWDIRTYSTATE=1 -PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;32m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' + +if [[ $(id -u) -eq 0 ]]; then + PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;31m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' +else + PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;32m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]' +fi # aliases alias bb='history -c && history -w && reset' |