Re: readline() with editing and history?
- From: Josef Wolf <jw@xxxxxxxxxxxxx>
- Date: Sat, 16 Sep 2006 02:41:17 +0900
On Sat, Sep 16, 2006 at 01:58:27AM +0900, Kent Sibilev wrote:
On 9/15/06, Josef Wolf <jw@xxxxxxxxxxxxx> wrote:
I'm looking for a readline() with history and editing support (like perl'srequire 'readline'
Term::Readline). Does such a thing exist for ruby?
It comes with Ruby.
Thanks for your quick reply, Kent! But somehow I don't get it:
jw@raven> irb
irb(main):001:0> require 'readline'
=> false
irb(main):002:0> readline
asdf^[[D^[[D^[[A^[[A
=> "asdf\e[D\e[D\e[A\e[A\n"
The ^[[D is the result of the up-arrow and ^[[A is the result of the
left-arrow. "ri readline" mentiones:
IO::readlines, IO#readline, IO#readlines, Kernel#readlines,
Kernel#readline, Pathname#readlines, Zlib::GzipReader#readline,
Zlib::GzipReader#readlines
But none of them seem to support line-editing or history. :-(
Any idea what is going wrong here?
.
- References:
- readline() with editing and history?
- From: Josef Wolf
- readline() with editing and history?
- Prev by Date: Re: not sure what is wrong. strange error
- Next by Date: Re: not sure what is wrong. strange error
- Previous by thread: readline() with editing and history?
- Next by thread: Rails: generate scaffold Product Admin overwrites admin pages
- Index(es):
Relevant Pages
|