added git branch info to path, updated install to use bash_profile instead of bashrc
This commit is contained in:
17
bash/bash_profile
Normal file
17
bash/bash_profile
Normal 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\$ "
|
||||||
12
install.sh
12
install.sh
@@ -40,12 +40,12 @@ cd "${ROOT}"
|
|||||||
cp "bash/bash_aliases.d/"*.sh "${HOME}/.bash_aliases.d"
|
cp "bash/bash_aliases.d/"*.sh "${HOME}/.bash_aliases.d"
|
||||||
#cp "bash/bash_completion.d/"*.sh "${HOME}/.bash_completion.d"
|
#cp "bash/bash_completion.d/"*.sh "${HOME}/.bash_completion.d"
|
||||||
#cp "bash/bash_functions.d/"*.sh "${HOME}/.bash_functions.d"
|
#cp "bash/bash_functions.d/"*.sh "${HOME}/.bash_functions.d"
|
||||||
#set up the bashrc file
|
#set up the bash_profile file
|
||||||
cp bash/bashrc "${HOME}"/.bashrc
|
cp bash/bash_profile "${HOME}"/.bash_profile
|
||||||
cat "bash/bash_magic/bashrc" >> "${HOME}"/.bashrc
|
cat "bash/bash_magic/bashrc" >> "${HOME}"/.bash_profile
|
||||||
if [ ! -f "${HOME}"/.bash_profile ]; then
|
if [ ! -f "${HOME}"/.bashrc ]; then
|
||||||
ln -s "${HOME}"/.bashrc "${HOME}"/.bash_profile
|
ln -s "${HOME}"/.bash_profile "${HOME}"/.bashrc
|
||||||
fi
|
if
|
||||||
|
|
||||||
###
|
###
|
||||||
# vim
|
# vim
|
||||||
|
|||||||
Reference in New Issue
Block a user