Permalink
Find file
036b2b5 Feb 2, 2015
41 lines (31 sloc) 1.2 KB
# aliases:
# use colorized output when listing files and don't show group
if [[ "$OSTYPE" =~ darwin ]]; then
alias ls='ls -G';
alias ll='ls -lG';
alias la='ls -lGa';
else
alias ls='ls --color=auto';
alias ll='ls --color=auto -l';
alias la='ls --color=auto -la';
fi;
# always ask for confirmation when removing files
alias rm='rm -i';
# always ask for confirmation when copying files
alias cp='cp -i';
# alias `simplehttpd` to start a simple webserver in the current director
alias simplehttpd='python -m SimpleHTTPServer 8888';
# alias to edit ~/.bash_profile and reload it after saving
alias pro='vi ~/.bash_profile; source ~/.bash_profile';
# make `less` not clear the screen upon exit
alias less='less -X';
# just for fun, but also make bash expand other aliasses for sudo, http://git.io/wtfbash
alias ffs='sudo ';
# and of course also do this for sudo itself
alias sudo='sudo ';
# git aliases
alias gl='git log --oneline --all --color --graph --decorate'
# start a new tmux session or attach to an existing one named after the current directory
alias tat='tmux new-session -As `basename $PWD`'
# always use vim instead of vi, this _strangly_ prevents unexplained non-zero exit codes on OS X
alias vi=vim