Created
January 6, 2016 18:21
-
-
Save lfalvarez/ba6ef905e00ddc5f56ef to your computer and use it in GitHub Desktop.
mi .bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= | |
# User specific aliases and function | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
c_reset=`tput sgr0` | |
c_user=`tput setaf 2; tput bold` | |
c_path=`tput setaf 4; tput bold` | |
c_git_clean=`tput setaf 2` | |
c_git_dirty=`tput setaf 1` | |
else | |
c_reset= | |
c_user= | |
c_path= | |
c_git_cleanclean= | |
c_git_dirty= | |
fi | |
git_prompt () | |
{ | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
return 0 | |
fi | |
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') | |
if git diff --quiet 2>/dev/null >&2; then | |
git_color="${c_git_clean}" | |
else | |
git_color=${c_git_cleanit_dirty} | |
fi | |
echo " [$git_color$git_branch${c_reset}]" | |
} | |
# PS1='${c_user}\u${c_reset}@${c_user}\h${c_reset}:${c_path}\W${c_reset}\$ ' | |
# Git alliases | |
alias gl='git pull' | |
alias gp='git push' | |
alias gd='git diff' | |
alias gc='git commit' | |
alias gca='git commit -a' | |
alias gco='git checkout' | |
alias gb='git branch' | |
alias gs='git status' | |
alias grm="git status | grep deleted | awk '{print \$3}' | xargs git rm" | |
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting | |
## HEROKU things | |
PATH="/usr/local/heroku/bin:$PATH" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment