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-02 04:46:28 -04:00
|
|
|
readline(prompt, add_hostory=nil)
|
1999-01-19 23:59:32 -05:00
|
|
|
|
2001-07-02 04:46:28 -04:00
|
|
|
Reads one line wit line edit. the line is added to the
|
|
|
|
history also if "add" is true.
|
1999-01-19 23:59:32 -05:00
|
|
|
|
2001-07-02 04:46:28 -04:00
|
|
|
<class mehods>
|
1999-01-19 23:59:32 -05:00
|
|
|
|
|
|
|
completion_proc = proc
|
|
|
|
|
2001-07-02 04:46:28 -04:00
|
|
|
Specifies Proc object to determin completion behavior. It
|
|
|
|
shoule take input-string, and return 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-02 04:46:28 -04:00
|
|
|
Specifies a chacatcter to be appended on completion.
|
|
|
|
Nothing will be appended if empty string ("") or nil is specified.
|
2001-06-19 05:21:38 -04:00
|
|
|
|
|
|
|
completion_append_character
|
|
|
|
|
2001-07-02 04:46:28 -04:00
|
|
|
Returns a string contains a character to be appended on
|
|
|
|
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.
|