diff --git a/bash/bash_profile b/bash/bash_profile index 04bce45..fc6b398 100644 --- a/bash/bash_profile +++ b/bash/bash_profile @@ -1,8 +1,3 @@ -#function parse_git_branch { -# git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' -#} - -#export PS1='\u@\h:\W $(parse_git_branch)\n\$ ' export EDITOR='vi' export WORKON_HOME=$HOME/.virtualenvs export LC_CTYPE="en_US.UTF-8" @@ -18,8 +13,16 @@ alias gitpretty="git log --pretty=format:'%h : %Cblue%aN%Creset : %Cred%d%Creset alias ls='ls -G' alias ll='ls -lG' -if [[ -r $HOME/.`hostname -s`_bash_profile ]]; then - source $HOME/.`hostname -s`_bash_profile +if [[ -r $HOME/.host_nickname ]]; then + HOST_NICKNAME=`cat .host_nickname` +else + HOST_NICKNAME=`hostname -s` +fi + +export PS1="\u@${HOST_NICKNAME}:\W \$ " + +if [[ -r $HOME/.${HOST_NICKNAME}_bash_profile ]]; then + source $HOME/.${HOST_NICKNAME}_bash_profile else echo "WARNING: Can't find custom bash_profile" fi