Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Tip: Save Typing ‘bundle exec’

If you’re a Ruby on Rails developer, you probably type the words ‘bundle exec’ numerous times a day. I finally got tired of it and decided to do something about it.

In the context of keeping it simple, I use the ‘alias’ command and add to my .profile. I know there are more Rails recommended ways of solving this problem via binstubs but I rather not use that approach.

My solution is simple, add an alias to my .profile like this:

alias be='bundle exec '

Keen observers will notice the trailing space after the command. This space allows for alias chaining and can be helpful.

The resulting shortcut allows this:

bundle exec rspec

To this:

be rspec

The ‘alias’ command is super useful and has many applications to help remove repetitive Typing tasks.

The post Tip: Save Typing ‘bundle exec’ appeared first on Accidental Technologist.



This post first appeared on Accidental Technologist - Musings About Entreprene, please read the originial post: here

Share the post

Tip: Save Typing ‘bundle exec’

×

Subscribe to Accidental Technologist - Musings About Entreprene

Get updates delivered right to your inbox!

Thank you for your subscription

×