summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2016-05-29 00:20:38 -0400
committerJesse Luehrs <doy@tozt.net>2016-05-29 00:20:38 -0400
commite015c5c2e3707d9d4392f43020274cae9dbe3287 (patch)
treed733a912dea3efa593ce67a216c84019ce5c5332
parente431a39fe641e8cca4c8abe3549460e8879f9839 (diff)
downloadreply-e015c5c2e3707d9d4392f43020274cae9dbe3287.tar.gz
reply-e015c5c2e3707d9d4392f43020274cae9dbe3287.zip
allow ~ in ReadLine's history_file option (#48)
-rw-r--r--lib/Reply/Plugin/ReadLine.pm1
1 files changed, 1 insertions, 0 deletions
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)
? ()