# Shell-style history for irb... now fixed!

**URL:** <https://www.ruby-forum.com/t/shell-style-history-for-irb-now-fixed/110776>\
**Category:** Ruby\
**Created:** [July 30, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/shell-style-history-for-irb-now-fixed/110776 "2007-07-30T20:55:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brblakley](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/f14d63/32.png) [@brblakley](https://www.ruby-forum.com/u/brblakley)\
**Post date:** [July 30, 2007, 8:55pm UTC](https://www.ruby-forum.com/t/shell-style-history-for-irb-now-fixed/110776/1 "2007-07-30T20:55:31Z")

</div>

Hey all,

Last year during RubyConf, I showed a little hack for adding shell-style  
history manipulation to irb. There was a bug in it where history  
replays that did assignments were executed in the wrong context, causing  
you to not have access to the newly-assigned variable after the replay  
was done.

Well, today, I’m happy to announce that this critical bug has been  
squashed and I’ve released the 1.0 (for lack of a better version number)  
version of the hack. It’s available on my blog, with background info,  
here:

[http://blog.bleything.net/2007/7/30/announcing-shell-style-history-for-irb-the-fixed-edition](http://blog.bleything.net/2007/7/30/announcing-shell-style-history-for-irb-the-fixed-edition)

You can take the code linked to from that post and drop it into your  
.irbrc and immediately enjoy such tasty methods as h, h!, and hw. I  
invite you to experiment!

Back when I first announced this hack, I heard from a couple of people  
who were interested in collaborating on a set of IRB hacks. I haven’t  
forgotten, I’m just a really terrible correspondent. The upshot for  
everyone else is that soon, you may not need to copy and paste the code!  
Stay tuned for more info!

Ben
