Skip to content

Instantly share code, notes, and snippets.

@2called-chaos
Created March 16, 2016 13:42
Show Gist options
  • Select an option

  • Save 2called-chaos/c2ebcbac83fa3846670c to your computer and use it in GitHub Desktop.

Select an option

Save 2called-chaos/c2ebcbac83fa3846670c to your computer and use it in GitHub Desktop.
binstubs light (hack)
# binstubs light
function bundle_exec {
bundler=`bundle list 2>&1`
cmd=$1
shift
if [[ $bundler == "" || $bundler =~ "Could not locate Gemfile" ]]
then
command="$cmd $@"
else
command="bundle exec $cmd $@"
fi
$command
}
alias cap='bundle exec cap'
alias pry='bundle_exec pry'
alias capify='bundle exec capify'
alias ruby='bundle_exec ruby'
alias rake='bundle_exec rake'
alias unicorn='bundle_exec unicorn'
alias rails='bundle_exec rails'
alias guard='bundle_exec guard'
alias spork='bundle_exec spork'
alias yard='bundle_exec yard'
alias rspec='bundle_exec rspec'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment