Skip to content

Instantly share code, notes, and snippets.

@diegok
Created May 8, 2017 10:54
Show Gist options
  • Save diegok/ae4386233cc7bcfe1b72dfef18b37a56 to your computer and use it in GitHub Desktop.
Save diegok/ae4386233cc7bcfe1b72dfef18b37a56 to your computer and use it in GitHub Desktop.
My reply and re.pl configs...
script_line1 = use strict
script_line2 = use warnings
script_line3 = use feature ':5.10';
script_line4 = use lib './lib'
script_line5 = use utf8
[Interrupt]
[DataDump]
[Colors]
[ReadLine]
[Hints]
[Packages]
[LexicalPersistence]
[ResultCache]
[Autocomplete::Packages]
[Autocomplete::Lexicals]
[Autocomplete::Functions]
[Autocomplete::Globals]
[Autocomplete::Methods]
[Autocomplete::Commands]
[Autocomplete::Keywords]
[AutoRefresh]
# ~/.re.pl/repl.rc
use feature ':5.10';
use lib './lib';
use Term::ANSIColor;
$_REPL->load_plugin($_) for qw(
History Colors
FancyPrompt Refresh
Interrupt OutputCache
DDC Nopaste
PPI
ReadLineHistory
MultiLine::PPI
Completion
CompletionDriver::Keywords
CompletionDriver::LexEnv
CompletionDriver::Methods
CompletionDriver::INC
CompletionDriver::Globals
CompletionDriver::Turtles
);
$_REPL->fancy_prompt(sub {
my $self = shift;
"\ca" . color('blue') . "\cb" . $self->current_package
. "\ca" . color('green') . "\cb" . '(0)'
. "\ca" . color('reset') . "\cb" . '> '
});
$_REPL->fancy_continuation_prompt(sub {
my $self = shift;
"\ca" . color('blue') . "\cb" . $self->current_package
. "\ca" . color('yellow') . "\cb" . '(' . $self->line_depth . ')'
. "\ca" . color('reset') . "\cb" . '> ' . (' ' x ($self->line_depth * 2))
});
#package main;
$Devel::REPL::Plugin::Packages::PKG_SAVE = 'main';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment