1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/ext/readline/README
knu f985b689ca * ext/readline/readline.c (readline_event): merge from 1.7: a
non-void function should return a value.

* ext/readline/readline.c: merge from 1.7: add new methods:
  Readline::completion_append_character and
  Readline::completion_append_character=.

* ext/readline/README, ext/readline/README.jp: merge from 1.7: add
  an English version of the document.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1570 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2001-07-05 15:54:00 +00:00

62 lines
1.1 KiB
Text

Extension for GNU Readline Library
Example:
require "readline"
include Readline
line = readline("Prompt> ", true)
[Readline]
<module function>
readline(prompt, add_history=nil)
Reads one line with line editing. The inputted line is added to the
history if add_history is true.
<class methods>
completion_proc = proc
Specifies a Proc object to determine completion behavior. It
should take input-string, and return an array of completion
candidates.
completion_proc
Returns the completion Proc object.
completion_case_fold = bool
Sets whether or not to ignore case on completion.
completion_case_fold
Returns true if completion ignores case.
completion_append_character = char
Specifies a character to be appended on completion.
Nothing will be appended if an empty string ("") or nil is
specified.
completion_append_character
Returns a string containing a character to be appended on
completion. The default is a space (" ").
vi_editing_mode
Specifies VI editing mode.
emacs_editing_mode
Specifies Emacs editing mode.
<class constants>
HISTORY
The history buffer. It behaves just like an array.