Skip to content

Instantly share code, notes, and snippets.

@scudco
Created February 5, 2011 01:04
Show Gist options
  • Save scudco/812090 to your computer and use it in GitHub Desktop.
Save scudco/812090 to your computer and use it in GitHub Desktop.
# Thank you http://twistedmind.com/bundle-exec-bash-shortcut
bundle_commands=( spec rspec cucumber cap watchr rails rackup autotest heroku rdebug )
function run_bundler_cmd () {
if [ -e ./Gemfile ]; then
echo "bundle exec $@"
bundle exec $@
else
echo "$@"
$@
fi
}
for cmd in $bundle_commands
do
alias $cmd="run_bundler_cmd $cmd"
done
# End thank you
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment