Created
June 30, 2009 03:53
-
-
Save fcamel/137978 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function set_hg_rep() { | |
hg_rep=$(pwd | awk -F/ '{ print $5 }') | |
if [ "$hg_rep" != "" ]; then | |
hg_rep="(\033[1;31m$(pwd | awk -F/ '{ print $5 }')\033[m)" | |
fi | |
export PS1="[\u@wiki \w $hg_rep]\n$ " | |
} | |
function my_cd() { | |
\cd $1 && set_hg_rep | |
} | |
alias cd=my_cd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment