Term::ReadLine::Perl5::History
Variables and functions supporting Term::ReadLine::Perl5's command history.
Insert $line into history list if $line is:
$line
bigger than the minimal length $minlength
$minlength
not same as last entry
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 or reset readline history.
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.
$which
$data
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
Returns true if saved history has a limited (stifled) or false if there is no limit (unstifled).
remove_history($which, $history_length)
Remove history element $which from the history. The removed element is returned.
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().
FILENAME
FROM
TO
read_history()
read_history_range()
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(LINE1 [, LINE2, ...])
sets the history of input, from where it can be used.
GetHistory
returns the history of input as a list.
To install Term::ReadLine::Perl5, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Term::ReadLine::Perl5
CPAN shell
perl -MCPAN -e shell install Term::ReadLine::Perl5
For more information on module installation, please visit the detailed CPAN module installation guide.