added git branch info to path, updated install to use bash_profile instead of bashrc

This commit is contained in:
2012-05-16 14:57:25 -07:00
parent 68674558de
commit 789924d4b7
2 changed files with 23 additions and 6 deletions

17
bash/bash_profile Normal file
View File

@@ -0,0 +1,17 @@
WHITE="\[\033[00m\]"
BLACK="\[\033[01;30m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
PURPLE="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
function parse_git_branch {
ref=$(git-symbolic-ref HEAD 2> /dev/null) || return
echo "("${ref#refs/heads/}")"
}
export TERM="xterm-color"
alias ls="ls -G"
export PS1="$PURPLE\u@\h$WHITE:$BLUE\w $YELLOW\$(parse_git_branch)$WHITE\$ "

View File

@@ -40,12 +40,12 @@ cd "${ROOT}"
cp "bash/bash_aliases.d/"*.sh "${HOME}/.bash_aliases.d"
#cp "bash/bash_completion.d/"*.sh "${HOME}/.bash_completion.d"
#cp "bash/bash_functions.d/"*.sh "${HOME}/.bash_functions.d"
#set up the bashrc file
cp bash/bashrc "${HOME}"/.bashrc
cat "bash/bash_magic/bashrc" >> "${HOME}"/.bashrc
if [ ! -f "${HOME}"/.bash_profile ]; then
ln -s "${HOME}"/.bashrc "${HOME}"/.bash_profile
fi
#set up the bash_profile file
cp bash/bash_profile "${HOME}"/.bash_profile
cat "bash/bash_magic/bashrc" >> "${HOME}"/.bash_profile
if [ ! -f "${HOME}"/.bashrc ]; then
ln -s "${HOME}"/.bash_profile "${HOME}"/.bashrc
if
###
# vim