mirror of
https://github.com/ovh/the-bastion.git
synced 2025-10-06 11:35:44 +08:00
enh: interactive: avoid a warn() when TERM is undef
This commit is contained in:
parent
8a0f7c6b4f
commit
3764d652da
1 changed files with 8 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue