completion_append_character=

Readline.completion_append_character = char
Class Public methods

Specifies a character to be appended on completion. Nothing will be appended if an empty string (ââ) or nil is specified.

For example:

require "readline"

Readline.readline("> ", true)
Readline.completion_append_character = " "

Result:

>
Input "/var/li".

> /var/li
Press TAB key.

> /var/lib
Completes "b" and appends " ". So, you can continuously input "/usr".

> /var/lib /usr

NOTE: Only one character can be specified. When âstringâ is specified, sets only âsâ that is the first.

require "readline"

Readline.completion_append_character = "string"
p Readline.completion_append_character # => "s"

Raises NotImplementedError if the using readline library does not support.

Raises SecurityError exception if $SAFE is 4.

doc_ruby_on_rails
2015-05-05 01:32:45
Comments
Leave a Comment

Please login to continue.