Skip to content

Instantly share code, notes, and snippets.

@bbartolome
Last active September 8, 2016 01:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bbartolome/f52160a9e48f94b83017a78c7198df1c to your computer and use it in GitHub Desktop.
Save bbartolome/f52160a9e48f94b83017a78c7198df1c to your computer and use it in GitHub Desktop.
.bash_profile
function tabname {
printf "\e]1;$1\a"
}
function winname {
printf "\e]2;$1\a"
}
function trash {
mv $@ ~/.Trash
}
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\W\[\033[32m\]\$(parse_git_branch)\[\033[00m\] [\t] $ "
alias vibash='vi ~/.bash_profile'
if ! ssh-add -l | grep id_rsa ; then
ssh-add ~/.ssh/id_rsa
fi
# brew install bash-completion
if [ -f $(brew --prefix)/etc/bash_completion ]; then
. $(brew --prefix)/etc/bash_completion
fi
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
source ~/.git-completion.bash
eval "$(docker-machine env default 2>/dev/null)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment