Skip to content

AaronC81/yes_i_did

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yes_i_did is a tiny utility which adds a single method to your IRB sessions, named yes. If you've just typoed the name of something and the "did you mean?" suggestion in the exception is correct, simply run yes to re-run your last IRB code snippet with the suggestion!

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

This can be a massive time-saver for quick IRB experiments.

Note: Always check the suggestion before running yes, and never use this for anything which could modify important data! I accept no responsibility if this deletes your Rails database with its suggestion or something.

Installation

First, install the gem:

gem install yes_i_did

Then add this line to .irbrc in your home directory (create it if it doesn't exist):

require 'yes_i_did'

You'll now be able to use yes in your IRB sessions.

About

Apply DidYouMean suggestions in IRB sessions

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages