From e015c5c2e3707d9d4392f43020274cae9dbe3287 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Sun, 29 May 2016 00:20:38 -0400 Subject: allow ~ in ReadLine's history_file option (#48) --- lib/Reply/Plugin/ReadLine.pm | 1 + 1 file changed, 1 insertion(+) (limited to 'lib') diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm index 55baa38..62a6fe8 100644 --- a/lib/Reply/Plugin/ReadLine.pm +++ b/lib/Reply/Plugin/ReadLine.pm @@ -40,6 +40,7 @@ sub new { my $self = $class->SUPER::new(@_); $self->{term} = Term::ReadLine->new('Reply'); my $history = $opts{history_file} || '.reply_history'; + $history =~ s{^~/}{$ENV{HOME}/}; $self->{history_file} = File::Spec->catfile( (File::Spec->file_name_is_absolute($history) ? () -- cgit v1.2.3-54-g00ecf