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