function precmd() { export PROMPT="-`hostname`- %n %T %~" local _git _branch _git=`findup .git` if test -n "$_git"; then _branch=`sed -e 's,.*/,,' $_git/HEAD` export PROMPT="$PROMPT ($_branch)" fi export PROMPT="$PROMPT>" } #export PROMPT="-`hostname`- %n %T %~>" # Another option: #export RPROMPT='%B%d%b %t ' #export PROMPT='%B%n@%m %#%b '