App-sdif
view release on metacpan or search on metacpan
script/sdif view on Meta::CPAN
use Text::ANSI::Fold qw(ansi_fold :constants); {
Text::ANSI::Fold->configure(padding => 1,
expand => 1,
tabstop => $app->tabstop);
}
$app->visible->{ht} //= 1 if $app->tabstyle;
if ($app->visible->{ht}) {
Text::ANSI::Fold->configure(
tabstyle => $app->tabstyle,
map { $_->[0] => unicode($_->[1]) }
grep { $_->[1] }
[ tabhead => $app->tabhead ],
[ tabspace => $app->tabspace ],
);
}
sub unicode {
my $char = shift or return undef;
if ($char =~ /^\X$/) {
$char;
} else {
eval qq["\\N{$char}"] or die "$!";
}
}
if ($app->margin > 0) {
Text::ANSI::Fold->configure(
script/sdif view on Meta::CPAN
=item B<--tabspace>=I<char>
Visualize characters. Currently only C<ht> (horizontal tab) is
supported. Each horizontal tab character is converted to B<tabhead>
and following B<tabspace> characters. They can be specified by
B<--tabhead> and B<--tabspace> option.
$ sdif --visible ht=1 --tabhead=T --tabspace=.
If the option value is longer than single character, it is evaluated
as unicode name.
$ sdif --visible ht=1 \
--tabhead="MEDIUM SHADE" \
--tabspace="LIGHT SHADE"
See L<https://www.unicode.org/charts/charindex.html> for Unicode
names.
B<cdif> shows non-space control characters visible by default. See
L<cdif/--visible>.
=item B<--tabstyle>=[C<space>,C<dot>,C<symbol>,C<shade>,C<bar>,C<dash>...]
=item B<--ts>=...
Option B<--tabstyle> (or B<--ts>) allow to set B<--tabhead> and
script/sdif view on Meta::CPAN
L<App::ansicolumn>
=cut
# LocalWords: perldoc colormap autocolor termcolor onword cdifopts
# LocalWords: mecab CJK diffopts colortable Unicode OCOMMAND cdif
# LocalWords: NCOMMAND OFILE MCOMMAND NFILE MFILE OMARK NMARK MMARK
# LocalWords: UMARK OLINE NLINE MLINE ULINE OTEXT NTEXT MTEXT UTEXT
# LocalWords: Cyan RGB SDIFOPTS Kazumasa Utashiro watchdiff sdif
# LocalWords: sdiff diff sdifrc CMY cmy macOS iTerm XTerm runin
# LocalWords: runout regex lenience tabhead tabspace unicode cyan
# LocalWords: tabstyle tabstop perl
( run in 0.423 second using v1.01-cache-2.11-cpan-88abd93f124 )