Skip to content

Instantly share code, notes, and snippets.

@clifferson
Forked from ivey/gist:1304518
Created October 30, 2011 06:24
Show Gist options
  • Save clifferson/1325580 to your computer and use it in GitHub Desktop.
Save clifferson/1325580 to your computer and use it in GitHub Desktop.
bundle function for rake, etc.
# http://twistedmind.com/bundle-exec-bash-shortcut
bundle_commands=( rake spec rspec cucumber cap watchr rails rackup )
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
fart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment