RAA - ruby_readline

ruby_readline / 0.5.4

Short description: Ruby Readline
Category: Library/Text
Status: usable
Created: 2001-05-19 05:33:57 GMT
Last update: -
Owner: KUBO Hiroya (Projects of this owner)
Homepage: http://www.mag.keio.ac.jp/~hiroya/ruby/rreadline/
Download: http://www.mag.keio.ac.jp/~hiroya/ruby/rreadline/rreadline-current.tar.gz
License: Ruby's
Dependency:
None
Description:

Emulating GNU Readline Library Functions by Ruby script.
This is NOT "ext/readline" (distributed with ruby, interface to GNU Readline).
A csh like sample program (directory/filename completion, history, cd, cat...) is included.

Usage:

(A) Readline

require "RReadline"
r = RReadline.new

def r.prompt
_print("prompt> ")
end

line = r.readline()
print line,"\n"

(B) CommandLineEditor

require "CommandLineEditor"
editor = CommandLineEditor.new

def editor.prompt
_print("prompt> ")
end

editor.executables={
"print" => Proc.new{|argv| print argv.join(","),"\n" }
}

editor.loop

Edit this project (for project owner)

back to RAA top