readline¶
Importing this module enables command line editing using GNU readline.
Functions¶
add_history((string) -> None) |
add an item to the history buffer |
clear_history(() -> None) |
Clear the current readline history. |
get_begidx(() -> int) |
get the beginning index of the completion scope |
get_completer(() -> function) |
Returns current completer function. |
get_completer_delims(() -> string) |
get the word delimiters for completion |
get_completion_type(() -> int) |
Get the type of completion being attempted. |
get_current_history_length(() -> integer) |
return the current (not the maximum) length of history. |
get_endidx(() -> int) |
get the ending index of the completion scope |
get_history_item(() -> string) |
return the current contents of history item at index. |
get_history_length(() -> int) |
return the maximum number of lines that will be written to |
get_line_buffer(() -> string) |
return the current contents of the line buffer. |
insert_text((string) -> None) |
Insert text into the line buffer at the cursor position. |
parse_and_bind((string) -> None) |
Execute the init line provided in the string argument. |
read_history_file(([filename]) -> None) |
Load a readline history file. |
read_init_file(([filename]) -> None) |
Execute a readline initialization file. |
redisplay(() -> None) |
Change what’s displayed on the screen to reflect the current contents of the line buffer. |
remove_history_item((pos) -> None) |
remove history item given by its position |
replace_history_item((pos, line) -> None) |
replaces history item given by its position with contents of line |
set_completer(([function]) -> None) |
Set or remove the completer function. |
set_completer_delims((string) -> None) |
set the word delimiters for completion |
set_completion_display_matches_hook(...) |
Set or remove the completion display function. |
set_history_length((length) -> None) |
set the maximal number of lines which will be written to |
set_pre_input_hook(([function]) -> None) |
Set or remove the function invoked by the rl_pre_input_hook callback. |
set_startup_hook(([function]) -> None) |
Set or remove the function invoked by the rl_startup_hook callback. |
write_history_file(([filename]) -> None) |
Save a readline history file. |