modules/trans.pl: use -no-ansi instead of regex

This commit is contained in:
Pragmatic Software 2021-01-19 02:23:10 -08:00
parent ba769dc446
commit f426594d80
1 changed files with 1 additions and 4 deletions

5
modules/trans.pl vendored
View File

@ -14,11 +14,8 @@ my $args = quotemeta "@ARGV";
$args =~ s/\\([ :-])/$1/g;
$args =~ s/^\s+|\s+$//g;
my $opts = '-j';
my $opts = '-j -no-ansi -no-autocorrect';
$opts .= ' -b' unless $args =~ /^-/;
my $result = `trans $opts $args`;
$result =~ s/\e\[\d+m//g;
print "$result\n";