Type:
Module
Constants:
HISTORY : history

The history buffer. It extends Enumerable module, so it behaves just like an array. For example, gets the fifth content that the user input by HISTORY.

FILENAME_COMPLETION_PROC : fcomp

The Object with the call method that is a completion for filename. This is sets by ::completion_proc= method.

USERNAME_COMPLETION_PROC : ucomp

The Object with the call method that is a completion for usernames. This is sets by ::completion_proc= method.

VERSION : version

Version string of GNU Readline or libedit.

The Readline module provides interface for GNU Readline. This module defines a number of methods to facilitate completion and accesses input history from the Ruby interpreter. This module supported Edit Line(libedit) too. libedit is compatible with GNU Readline.

GNU Readline

www.gnu.org/directory/readline.html

libedit

www.thrysoee.dk/editline/

Reads one inputted line with line edit by ::readline method. At this time, the facilitatation completion and the key bind like Emacs can be operated like GNU Readline.

require "readline"
while buf = Readline.readline("> ", true)
  p buf
end

The content that the user input can be recorded to the history. The history can be accessed by Readline::HISTORY constant.

require "readline"
while buf = Readline.readline("> ", true)
  p Readline::HISTORY.to_a
  print("-> ", buf, "\n")
end

Most of methods raise SecurityError exception if $SAFE is 4.

Documented by TAKAO Kouji <kouji at takao7 dot net>.

set_screen_size

Readline.set_screen_size(rows, columns) â self Class Public methods

2015-05-05 03:01:32
completer_quote_characters=

Readline.completer_quote_characters = string Class Public methods Sets a list

2015-05-05 01:20:29
point

Readline.point â int Class Public methods Returns the index of the current

2015-05-05 02:31:05
filename_quote_characters

Readline.filename_quote_characters â string Class Public methods Gets a list

2015-05-05 02:04:06
completion_append_character

Readline.completion_append_character â char Class Public methods Returns a

2015-05-05 01:31:06
redisplay

Readline.redisplay â self Class Public methods Change what's displayed on the

2015-05-05 02:47:03
insert_text

Readline.insert_text(string) â self Class Public methods Insert text into the

2015-05-05 02:17:31
pre_input_hook=

Readline.pre_input_hook = proc Class Public methods Specifies a

2015-05-05 02:41:48
output=

Readline.output = output Class Public methods Specifies a

2015-05-05 02:26:16
completion_append_character=

Readline.completion_append_character = char Class Public methods Specifies

2015-05-05 01:32:45