diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Reply/Plugin/Defaults.pm | 1 | ||||
-rw-r--r-- | lib/Reply/Plugin/ReadLine.pm | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/Reply/Plugin/Defaults.pm b/lib/Reply/Plugin/Defaults.pm index e7874e3..bbe5934 100644 --- a/lib/Reply/Plugin/Defaults.pm +++ b/lib/Reply/Plugin/Defaults.pm @@ -48,6 +48,7 @@ sub compile { my $env = { map { %$_ } $self->publish('lexical_environment') }; my $package = ($self->publish('package'))[-1]; + $package = 'main' unless defined $package; my $prefix = "package $package;\n$PREFIX"; diff --git a/lib/Reply/Plugin/ReadLine.pm b/lib/Reply/Plugin/ReadLine.pm index 55baa38..5cced70 100644 --- a/lib/Reply/Plugin/ReadLine.pm +++ b/lib/Reply/Plugin/ReadLine.pm @@ -14,7 +14,7 @@ use Term::ReadLine; ; .replyrc [ReadLine] - history_file = '.hist' + history_file = .hist history_length = 100 =head1 DESCRIPTION @@ -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) ? () |