r unin=in

January 7, 2014

Here is a quick ZSH trick I learned from my awesome coworker Gabe Berke-Williams. In ZSH, you can re-run your last command using r.

bundle install
r #=> bundle install

This isn’t terribly help until you find out that you can perform some basic substitution on your command. How about the following scenario? You’ve upgraded postgres and need to reinstall the gem.

gem uninstall pg
r unin=in #=> gem install pg

It is a small trick but can come in handy.

Discussion, links, and tweets

I'm a Senior Software Engineer at Heroku

Follow me on Twitter. I rarely post anything but it can't hurt to try.