GNU Readline Library. Node: Readline Variables
Custom Functions
Programming with GNU Readline
Readline Convenience Functions
2.3: Readline Variables
These variables are available to function writers.
- Variable: char * rl_line_buffer
-
This is the line gathered so far. You are welcome to modify the
contents of the line, but see Allowing Undoing.
- Variable: int rl_point
-
The offset of the current cursor position in
rl_line_buffer
(the point).
- Variable: int rl_end
-
The number of characters present in
rl_line_buffer
. When
rl_point
is at the end of the line, rl_point
and
rl_end
are equal.
- Variable: int rl_mark
-
The mark (saved position) in the current line. If set, the mark
and point define a region.
- Variable: int rl_done
-
Setting this to a non-zero value causes Readline to return the current
line immediately.
- Variable: int rl_pending_input
-
Setting this to a value makes it the next keystroke read. This is a
way to stuff a single character into the input stream.
- Variable: char * rl_prompt
-
The prompt Readline uses. This is set from the argument to
readline ()
, and should not be assigned to directly.
- Variable: char * rl_library_version
-
The version number of this revision of the library.
- Variable: char * rl_terminal_name
-
The terminal type, used for initialization.
- Variable: char * rl_readline_name
-
This variable is set to a unique name by each application using Readline.
The value allows conditional parsing of the inputrc file
(see Conditional Init Constructs).
- Variable: FILE * rl_instream
-
The stdio stream from which Readline reads input.
- Variable: FILE * rl_outstream
-
The stdio stream to which Readline performs output.
- Variable: Function * rl_startup_hook
-
If non-zero, this is the address of a function to call just
before
readline
prints the first prompt.
- Variable: Function * rl_event_hook
-
If non-zero, this is the address of a function to call periodically
when readline is waiting for terminal input.
- Variable: Function * rl_getc_function
-
If non-zero,
readline
will call indirectly through this pointer
to get a character from the input stream. By default, it is set to
rl_getc
, the default readline
character input function
(see Utility Functions).
- Variable: VFunction * rl_redisplay_function
-
If non-zero,
readline
will call indirectly through this pointer
to update the display with the current contents of the editing buffer.
By default, it is set to rl_redisplay
, the default readline
redisplay function (see Redisplay).
- Variable: Keymap rl_executing_keymap
-
This variable is set to the keymap (see Keymaps) in which the
currently executing readline function was found.
- Variable: Keymap rl_binding_keymap
-
This variable is set to the keymap (see Keymaps) in which the
last key binding occurred.
Custom Functions
Programming with GNU Readline
Readline Convenience Functions