From b1be2db7c3c2ea9bb4e23fb9941e9f86537e5365 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Thu, 21 Jun 2012 10:33:52 +0100 Subject: [PATCH] Update ruby-related shell aliases --- shell/ruby.sh | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/shell/ruby.sh b/shell/ruby.sh index 608abb7..2429926 100644 --- a/shell/ruby.sh +++ b/shell/ruby.sh @@ -12,13 +12,25 @@ alias bu="bundle update" alias bco="bundle console" # Bundler aliases for specific ruby commands -alias ru="bundle exec ruby" -alias ra="bundle exec rake" -alias rai="bundle exec rails" -alias rs="bundle exec rspec" -alias ca="bundle exec cap" -alias cu="bundle exec cucumber" -alias va="bundle exec vagrant" +if [ -n "$BASH_VERSION" ]; then + alias ru="bundle exec ruby" + alias ra="bundle exec rake" + alias rai="bundle exec rails" + alias rs="bundle exec rspec" + alias ca="bundle exec cap" + alias cu="bundle exec cucumber" + alias va="bundle exec vagrant" +elif [ -n "$ZSH_VERSION" ]; then + # With Z-Shell I use oh-my-zsh and it's bundler plugin negating the need to + # manually prefix command with 'bundle exec'. + alias ru="ruby" + alias ra="rake" + alias rai="rails" + alias rs="rspec" + alias ca="cap" + alias cu="cucumber" + alias va="vagrant" +fi # Load rbenv or RVM depending on which is available if [ -d "$HOME/.rbenv/bin" ]; then