Files
dotfiles/bash/bash_aliases
2013-07-04 18:59:12 +01:00

13 lines
298 B
Bash

function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ -f $HOME/.srv_name ]; then
SRV_NAME=`cat $HOME/.srv_name`
PS1='\u@\h($SRV_NAME):\W $(parse_git_branch)\n\$ '
else
PS1='\u@\h:\W $(parse_git_branch)\n\$ '
fi
export PS1