Skip to content

Instantly share code, notes, and snippets.

@CodeVachon
Last active August 31, 2015 16:28
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 CodeVachon/807666f0361c92102c3f to your computer and use it in GitHub Desktop.
Save CodeVachon/807666f0361c92102c3f to your computer and use it in GitHub Desktop.
My .bash_profile file
# Git Auto Complete
# install these in home (~) directory.
# https://github.com/git/git/blob/8976500cbbb13270398d3b3e07a17b8cc7bff43f/contrib/completion/git-completion.bash
# https://github.com/git/git/blob/8976500cbbb13270398d3b3e07a17b8cc7bff43f/contrib/completion/git-prompt.sh
if [ -f ~/.git-completion.bash ]; then
source ~/.git-completion.bash
fi
if [ -f ~/.git-prompt.sh ]; then
source ~/.git-prompt.sh
fi
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export PS1="\[$(tput sgr0)\]\[$(tput setaf 7)\]\t \[$(tput sgr0)\][\[$(tput setaf 6)\]\u\[$(tput setaf 5)\]@\[$(tput setaf 5)\]:\[$(tput setaf 1)\]\w\\[$(tput bold)\]\[$(tput setaf 3)\]\$(__git_ps1)\[$(tput sgr0)\]]\n#\[$(tput setaf 6)\]\[$(tput sgr0)\] "
alias editprofile='sudo nano ~/.bash_profile'
alias reloadprofile='source ~/.bash_profile'
alias sb='open -a "Sublime Text"'
alias sb2='open -a "Sublime Text 2"'
alias atom='open -a "Atom"'
alias lsl='ls -la'
alias cls='clear'
alias show='open .'
alias hosts='sudo nano /etc/hosts'
alias snano='sudo nano'
alias sudo='sudo '
updateNode() {
node -v
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
node -v
}
@CodeVachon
Copy link
Author

Note that in \$(__git_ps1) the $ is escaped. This forces __git_ps1 in the prompt to update on every command input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment