irb-history gives IRB persistent, shared Readline history by way of Distributed Ruby (DRb). What does that mean?
irb-history-server stores its history in YAML in a file of
your choice (the default is
Load the irb-history client in your
~/.irbrc, and you'll
instantly have access to the irb-history store. Every line you type is sent
to the server and will appear in other clients' histories immediately.
Because irb-history uses DRb, you can share your history with other IRB sessions:
on the same computer
on other computers on your local network
on computers connected to the Internet (fun, but not recommended :))
Installation and usage
It's a simple process:
Install the gem.
$ gem install irb-history
Start a history server listening on
26501(see the irb-history-server documentation for more options).
$ irb-history-server -d
Note: If you wish to use irb-history on a network, you'll need to pass the
-hflag with an appropriate address to listen on.
Add three lines to your
require 'rubygems' require 'irb/history' IRB::History.start_client
This connects to the history server on
26501. If you need to specify a different host and/or port, just pass a DRb URI to
start_client. For example:
connects to the history server on host
Check out the darcs repository:
$ darcs get http://dev.conio.net/repos/irb-history
irb-history is freely distributable under the terms of a MIT-style license.
Sam Stephenson <email@example.com>