[ANN] irb-history 1.0.0: Persistent, shared Readline history for IRB

S

Sam Stephenson

irb-history 1.0.0
-----------------
irb-history gives IRB persistent, shared Readline history by way of=20
Distributed Ruby (DRb). What does that mean?

Persistent

irb-history-server stores its history in YAML in a file of your choice (the=
=20
default is ~/.irb_history).

Shared

Load the irb-history client in your ~/.irbrc, and you'll instantly have=20
access to the irb-history store. Every line you type is sent to the server=
=20
and will appear in other clients' histories immediately.

Because irb-history uses DRb, you can share your history with other IRB=20
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:

1. Install the gem.
$ gem install irb-history

2. Start a history server listening on 127.0.0.1, port 26501 (see the=20
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=20
pass the -h flag with an appropriate address to listen on.
=20
3. Add three lines to your ~/.irbrc.
require 'rubygems'
require 'irb/history'
IRB::History.start_client

This connects to the history server on 127.0.0.1, port 26501. If you=
=20
need to specify a different host and/or port, just pass a DRb URI to=
=20
start_client. For example:
IRB::History.start_client 'druby://galt:4000'
connects to the history server on host galt, port 4000.


Source code
-----------
Check out the darcs repository:
$ darcs get http://dev.conio.net/repos/irb-history
RDoc documentation:
http://irb-history.rubyforge.org/rdoc/


irb-history is freely distributable under the terms of a MIT-style license.
Enjoy!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top