summary refs log tree commit diff
path: root/.zshrc
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2013-09-05 16:41:55 -0400
committerJune McEnroe <june@causal.agency>2013-09-05 16:41:55 -0400
commit7346ef8f02dc20402d7de15c226a9b304de7a04b (patch)
tree22763cc6254727fbb4aa406ed0858d298e07ddb6 /.zshrc
parentchruby to ruby-2.0.0 (diff)
downloadsrc-7346ef8f02dc20402d7de15c226a9b304de7a04b.tar.gz
src-7346ef8f02dc20402d7de15c226a9b304de7a04b.zip
Only alias hub if it exists
Diffstat (limited to '')
-rw-r--r--.zshrc8
1 files changed, 5 insertions, 3 deletions
diff --git a/.zshrc b/.zshrc
index bdb1933d..354a5dae 100644
--- a/.zshrc
+++ b/.zshrc
@@ -120,10 +120,12 @@ alias Syu='pacman -Syu'
 alias Ss='pacman -Ss'
 alias p='pacman'
 
-compdef hub=git
-alias git=hub
-alias g=hub
+if which hub &> /dev/null; then
+  compdef hub=git
+  alias git=hub
+fi
 
+alias g=git
 alias ga='git add'
 alias gb='git branch'
 alias gc='git commit'