summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-06-03 15:17:35 -0500
committerJesse Luehrs <doy@tozt.net>2013-06-03 15:17:35 -0500
commit60f235d03fba8232e7f691550ee715e1cfb9c5b6 (patch)
treed9a07c0293d7dfbbc368f84d6bc7d506ad1979ad
parent0520cc70067b1bb5eb724922802e7c06fb9b25cd (diff)
downloadreply-60f235d03fba8232e7f691550ee715e1cfb9c5b6.tar.gz
reply-60f235d03fba8232e7f691550ee715e1cfb9c5b6.zip
avoid writing the history file at all if nothing is to be saved
-rw-r--r--lib/Reply/Plugin/ReadLine.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm
index 54c262b..39126d1 100644
--- a/lib/Reply/Plugin/ReadLine.pm
+++ b/lib/Reply/Plugin/ReadLine.pm
@@ -52,6 +52,8 @@ sub read_line {
sub DESTROY {
my $self = shift;
+ return if $self->{history_length} == 0;
+
# XXX support more later
return unless $self->{term}->ReadLine eq 'Term::ReadLine::Gnu';