DEV Community

Aaron Christiansen
Aaron Christiansen

Posted on

"yes_i_did" - A tiny gem to rerun your last IRB command with the "did you mean" suggestion if you make a typo

I've written a tiny gem called yes_i_did which adds a new method to your IRB session, yes. If you didn't quite get the name of something right in a command, simply invoke yes to rerun it with the typo fixed using the "did you mean" suggestion!

Example of the utility in use. Running "yes" replaces a typoed usage of "append" with the correct spelling and reruns the command.

Setup is simple: just install the gem and require it in your ~/.irbrc.

This has already proven a handy time-saver for me, and I hope it can be for you too!

Top comments (0)