From 60f235d03fba8232e7f691550ee715e1cfb9c5b6 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 3 Jun 2013 15:17:35 -0500 Subject: avoid writing the history file at all if nothing is to be saved --- lib/Reply/Plugin/ReadLine.pm | 2 ++ 1 file changed, 2 insertions(+) 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'; -- cgit v1.2.3-54-g00ecf