End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Readline.completion_quote_character
Readline.completion_quote_character → char
ext/readline/readline.c
View on GitHub ↗
static VALUE
readline_s_get_completion_quote_character(VALUE self)
{
char buf[1];
if (rl_completion_quote_character == '\0')
return Qnil;
buf[0] = (char) rl_completion_quote_character;
return rb_locale_str_new(buf, 1);
}
When called during a completion (e.g. from within your completion_proc), it will return a string containing the character used to quote the argument being completed, or nil if the argument is unquoted.
When called at other times, it will always return nil.
Note that Readline.completer_quote_characters must be set, or this method will always return nil.