Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
87 lines (75 sloc) 2.37 KB
#! /usr/bin/env bash
# General aliases
case $OSTYPE in
alias l='ls --color'
alias l='ls -G'
alias plxml=' plutil -convert xml1 -o -'
alias pljson=' plutil -convert json -o -'
alias flep='pgrep -ifl'
# Clear defaults caches, reload them, and then kill everything!
alias fixpref='sudo killall -SIGKILL cfprefsd && killall Dock && killall Finder'
alias l='ls -G'
if [[ -x /usr/local/bin/ls ]]; then
echo using /usr/local/bin/ls --color
alias lc='/usr/local/bin/ls --color'
else alias l=ls
alias l='ls --color'
alias l=ls
# ls aliases
alias ll='l -l'
alias lt='l -rt'
alias la='l -A'
alias llt='l -lrt'
alias lla='l -lA'
alias llat='l -lArt'
# safe file operations
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
# human-readable 'df' and 'du'
alias df='df -h'
alias du='du -h'
# other
alias timestamp='date "+%Y-%m-%d_%H:%M:%S"'
alias h='history'
alias ri='ri -Tf ansi'
alias dircmp='diff -arq'
alias ..='cd ..'
alias ...='cd ..; cd ..'
alias ....='cd ..; cd ..; cd ..'
alias .....='cd ..; cd ..; cd ..; cd ..'
# Misc
alias g='grep -i' # Case insensitive grep
alias f='find . -iname'
alias ducks='du -cksh * | sort -rn|head -11' # Lists folders and files sizes in the current folder
alias top='top -o cpu'
alias systail='tail -f /var/log/system.log'
alias m='more'
alias ssh-fingerprint='ssh-keygen -l -f'
# Quick way to rebuild the Launch Services database and get rid
# of duplicates in the Open With submenu.
alias fixopenwith='/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user'
# Python
alias pygcat="pygmentize -f terminal256 -O style=native -g"
alias dj=""
alias djp=" --pythonpath=$(pwd)"
alias djs=" --settings"
alias djps=" --pythonpath=$(pwd) --settings"
# Xcode
alias swift='/Applications/'
alias use_xcode5="sudo xcode-select -switch /Applications/"
alias use_xcode6="sudo xcode-select -switch /Applications/"