Skip to content

End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

class method

Readline.point

Readline.point → int

Returns the index of the current cursor position in Readline.line_buffer.

The index in Readline.line_buffer which matches the start of input-string passed to completion_proc is computed by subtracting the length of input-string from Readline.point.

Example
start = (the length of input-string) - Readline.point

Raises NotImplementedError if the using readline library does not support.