diff .bashrc @ 16:b9896ae0733c

Stole pretty PS1 and xterm title changing from BackTrack 4. Also added a switch to the dotfile check so we can create a list of hosts for which we don't want to check against the server, just warn.
author huston@80426f53-59d1-405d-934b-f07cd76f4a1a
date Sat, 05 Sep 2009 20:18:20 +0000
parents 94cfcec3b5b6
children 90ad040b032c
line wrap: on
line diff
--- a/.bashrc	Sun Aug 30 20:37:09 2009 +0000
+++ b/.bashrc	Sat Sep 05 20:18:20 2009 +0000
@@ -18,12 +18,21 @@
 #
 # Environment variables
 #
-[[ "$PS1" ]] && export PS1='\h:\w\$ '
+[[ "$PS1" ]] && export PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
 export PAGER=less
 export EDITOR=vim
 export RUBYLIB=$HOME/Installs/rubygems/lib
 export GEM_HOME=$HOME/Installs/rubygems/gems
 
+# If this is an xterm set the title to user@host:dir
+case "$TERM" in
+xterm*|rxvt*)
+    PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'
+    ;;
+*)
+    ;;
+esac
+
 #
 # Paths
 #