Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
No longer die when Term::ReadLine::Gnu is not installed and history
Browse files Browse the repository at this point in the history
… is set to 1.
  • Loading branch information
trizen committed Feb 13, 2021
1 parent 42f1a18 commit b624785
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/straw-viewer
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,8 @@ if ($opt{history}) {
eval { $term->ReadHistory($opt{history_file}) };

# All history entries
my @history = $term->history_list;
my @history;
eval { @history = $term->history_list };

# Rewrite the history file, when the history_limit has been reached.
if ($opt{history_limit} > 0 and @history > $opt{history_limit}) {
Expand Down

0 comments on commit b624785

Please sign in to comment.