# HG changeset patch # User Steve Losh # Date 1250889772 14400 # Node ID 81d340e7e285b58cd4c88e2797b62b251f8ca066 # Parent 4e6f4c9d1215d6dc040944df6944c9c7cb0e62cc Fix the prompt quoting and expansion once and for all. diff -r 4e6f4c9d1215 -r 81d340e7e285 .bashrc --- a/.bashrc Fri Aug 21 17:16:46 2009 -0400 +++ b/.bashrc Fri Aug 21 17:22:52 2009 -0400 @@ -48,14 +48,17 @@ # Prompt stuff --------------------------------------------------------------- -D=$'\e[37;40m' -PINK=$'\e[35;40m' -GREEN=$'\e[32;40m' -ORANGE=$'\e[33;40m' +D=$'\[\e[37;40m\]' +PINK=$'\[\e[35;40m\]' +GREEN=$'\[\e[32;40m\]' +ORANGE=$'\[\e[33;40m\]' hg_ps1() { hg prompt "{${D} on ${PINK}{branch}}{${D} at ${ORANGE}{bookmark}}{${GREEN}{status}}{${GREEN}{update}}" 2> /dev/null } -export PS1='\n${PINK}\u ${D}at ${ORANGE}\h ${D}in ${GREEN}\w$(hg_ps1)\ -${D}\n$ ' +render_ps1() { + echo "\n${PINK}\u ${D}at ${ORANGE}\h ${D}in ${GREEN}\w$(hg_ps1)${D}\n$ " +} + +PROMPT_COMMAND='PS1="`render_ps1`"'"; $PROMPT_COMMAND" \ No newline at end of file