On Thu, 26 Oct 2006, Robin Rosenberg wrote: > Of course you will read and understand this code. I don't know how good an > idea it is to use the DEBUG trap this way. I set my prompt without using it, with something approximating this being defined in my .bash_profile. I think the use of ' instead of " causes evaluation of __prompt_githead be delayed until the prompt is displayed. PS1='$(__prompt_githead) '$PS1 __prompt_githead() { PS_GIT=$(git-symbolic-ref HEAD 2>/dev/null) || exit echo -n " $(basename $PS_GIT)" } -- - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html