enh: interactive: avoid a warn() when TERM is undef

This commit is contained in:
Stéphane Lesimple 2021-02-19 17:45:09 +00:00 committed by Stéphane Lesimple
parent 8a0f7c6b4f
commit 3764d652da

View file

@ -75,7 +75,14 @@ EOM
# setup readline
$term->ornaments(1);
if (!$ENV{'TERM'}) {
# if TERM is undef, don't call $term->ornaments(1) or we'll generate a warn
print "Your TERM envvar is not defined, some things might not work correctly!\n\n";
}
else {
$term->ornaments(1);
}
my $attribs = $term->Attribs;
$attribs->{'completion_function'} = sub {