diff options
author | Patrick Simianer <p@simianer.de> | 2015-02-21 19:53:41 +0100 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2015-02-21 19:53:41 +0100 |
commit | 2091605c1623b30c4e12688f6939524e239d0c11 (patch) | |
tree | 7444a02bc2d3b8c9a14c479631dfb8f925cd7e0b | |
parent | 3abe956fef5171279f5815fd3da1ab9618db7287 (diff) |
zsh: check whether host has 'colordiff'
-rw-r--r-- | .zshrc | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -153,7 +153,6 @@ alias updatedb='sudo updatedb' alias qmv='qmv -evim -fdo' alias dusage='du -hs *' alias df='df -h' -alias diff='colordiff' alias iwlist='sudo iwlist wlan0 scan' alias fumount='fusermount -u' alias more='less' @@ -182,6 +181,7 @@ alias always_on='xset dpms 0 0 0' alias quotes='curl -s "http://download.finance.yahoo.com/d/quotes.csv?s=AAPL+AMD+GOOG&f=l1"' alias irb='pry' alias watch_d='while true; do clear; ps ax | grep -P "\sD\+?\s"; sleep 5; done' +alias easy_install_home='easy_install --install-dir=$HOME/lib/python/site-packages' if [[ -f ~/.zshrcp ]]; then source ~/.zshrcp fi @@ -205,3 +205,11 @@ esac stty -ixon # enable mapping of C-s in vim.. +diff () { + if hash colordiff 2>/dev/null; then + colordiff "$@" + else + diff "$@" + fi +} + |