diff rc/bashrc @ 352:038c28c748d0

The color prompt is broken-ish in DFBSD.
author Edho Arief <edho@myconan.net>
date Sat, 26 May 2012 16:10:27 +0000
parents 001cdf389aaf
children 8fcb3f1553cf
line wrap: on
line diff
--- a/rc/bashrc	Sat May 26 11:06:44 2012 +0000
+++ b/rc/bashrc	Sat May 26 16:10:27 2012 +0000
@@ -170,13 +170,14 @@
   fi
 done
 
+PS1='[\u@\h \W]\$ '
 case "${TERM}" in
   xterm*|screen*|dtterm*)
     PROMPT_COMMAND='echo -ne "\033]0;'"${USER:-$LOGNAME}@$(uname -n)"': ${PWD}\007";'"${PROMPT_COMMAND}"
-    PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[0;36m\]\W\[\e[0m\]]\$ '
-  ;;
-  *)
-    PS1='[\u@\h \W]\$ '
+    # DragonFly's Bash is a bit buggy.
+    if [ "$(uname)" != "DragonFly" ]; then
+      PS1='[\[\e[0;33m\]\u\[\e[0m\]@\[\e[0;32m\]\h\[\e[0m\] \[\e[0;36m\]\W\[\e[0m\]]\$ '
+    fi
   ;;
 esac