NAME
Term::ReadLine::Perl5::History
DESCRIPTION
Variables and functions supporting Term::ReadLine::Perl5's command history.
add_line_to_history
Insert $line into history list if $line is:
bigger than the minimal length
$minlengthnot same as last entry
add_history
add_history($line1, ...)
Place @_ at the end of the history list unless the history is stifled, or there are already too many items.
clear_history
clear_history()
Clear or reset readline history.
replace_history_entry
replace_history_entry($which, $data)
Make the history entry at $which have $data. This returns the old entry. In the case of an invalid $which, $<undef> is returned.
unstifle_history
unstifle_history
Unstifle or remove limit the history list.
Theprevious maximum number of history entries is returned. The value is positive if the history was stifled and negative if it wasn't.
history_is_stifled
history_is_stifled
Returns true if saved history has a limited (stifled) or false if there is no limit (unstifled).
remove_history
remove_history($which, $history_length)
Remove history element $which from the history. The removed element is returned.
ReadHistory
ReadHistory([FILENAME [,FROM [,TO]]])
int read_history(str filename = '~/.history',
int from = 0, int to = -1)
int read_history_range(str filename = '~/.history',
int from = 0, int to = -1)
adds the contents of FILENAME to the history list, a line at a time. If FILENAME is false, then read from ~/.history. Start reading at line FROM and end at TO. If FROM is omitted or zero, start at the beginning. If TO is omitted or less than FROM, then read until the end of the file. Returns true if successful, or false if not. read_history() is an aliase of read_history_range().
WriteHistory
WriteHistory([FILENAME])
int write_history(str filename = '~/.history')
writes the current history to FILENAME, overwriting FILENAME if necessary. If FILENAME is false, then write the history list to ~/.history. Returns true if successful, or false if not.
SetHistory
SetHistory(LINE1 [, LINE2, ...])
sets the history of input, from where it can be used.
GetHistory
returns the history of input as a list.