App-ccdiff
view release on metacpan or search on metacpan
"$home/.config/ccdiff",
) {
-s $rcf or next;
(stat $rcf)[2] & 022 and next;
open my $fh, "<", $rcf or next;
while (<$fh>) {
my ($k, $v) = (m/^\s*([-\w]+)\s*[:=]\s*(.*\S)/) or next;
$rc{ lc $k
=~ s{[-_]colou?r$}{}ir
=~ s{background}{bg}ir
=~ s{^(?:unicode|utf-?8?)$}{utf8}ir
} = $v
=~ s{U\+?([0-9A-Fa-f]{2,7})}{chr hex $1}ger
=~ s{^(?:no|false)$}{0}ir
=~ s{^(?:yes|true)$}{-1}ir; # -1 is still true
}
}
} # read_rc
# Return the known colors from Term::ANSIColor
# Stolen straight from the pm
verbose_colour
=item utf8 (-U)
utf8 : yes
Defines whether all I/O is to be interpreted as UTF-8. The default is C<no>.
This option may also be specified as
unicode
utf
utf-8
=item index (-I)
index : no
Defines if the position indication for a change chunk is prefixed with an
index number. The default is C<no>. The index is 1-based.
lib/App/ccdiff.pm view on Meta::CPAN
"$home/.config/ccdiff",
) {
-s $rcf or next;
(stat $rcf)[2] & 022 and next;
open my $fh, "<", $rcf or next;
while (<$fh>) {
my ($k, $v) = (m/^\s*([-\w]+)\s*[:=]\s*(.*\S)/) or next;
$rc{ lc $k
=~ s{[-_]colou?r$}{}ir
=~ s{background}{bg}ir
=~ s{^(?:unicode|utf-?8?)$}{utf8}ir
} = $v
=~ s{U\+?([0-9A-Fa-f]{2,7})}{chr hex $1}ger
=~ s{^(?:no|false)$}{0}ir
=~ s{^(?:yes|true)$}{-1}ir; # -1 is still true
}
}
} # read_rc
# Return the known colors from Term::ANSIColor
# Stolen straight from the pm
lib/App/ccdiff.pm view on Meta::CPAN
verbose_colour
=item utf8 (-U)
utf8 : yes
Defines whether all I/O is to be interpreted as UTF-8. The default is C<no>.
This option may also be specified as
unicode
utf
utf-8
=item index (-I)
index : no
Defines if the position indication for a change chunk is prefixed with an
index number. The default is C<no>. The index is 1-based.
t/01-no-color.t view on Meta::CPAN
Unified with ascii markers
01_1.txt
01_2.txt
-mau0 --no-header
3,3c3,3
-usu. Ad duo posse theophrastus, vim in accumsan
- ^ ^
+usu. Ad duo posse theophrastus. Vim in accumsan
+ ^ ^
** EOT **
Unified with unicode markers
01_1.txt
01_2.txt
-mu0 --no-header
3,3c3,3
-usu. Ad duo posse theophrastus, vim in accumsan
- â¼ â¼
+usu. Ad duo posse theophrastus. Vim in accumsan
+ â² â²
** EOT **
Unified with ascii markers and context
t/01-no-color.t view on Meta::CPAN
Unified with ascii verbose 1
01_1.txt
01_2.txt
-au0 -v1 --no-header
3,3c3,3
-usu. Ad duo posse theophrastus, vim in accumsan
- -- verbose : COMMA, LATIN SMALL LETTER V
+usu. Ad duo posse theophrastus. Vim in accumsan
+ -- verbose : FULL STOP, LATIN CAPITAL LETTER V
** EOT **
Unified with unicode verbose 1
01_1.txt
01_2.txt
-u0 -v1 --no-header
3,3c3,3
-usu. Ad duo posse theophrastus, vim in accumsan
- -- verbose : COMMA, LATIN SMALL LETTER V
+usu. Ad duo posse theophrastus. Vim in accumsan
+ -- verbose : FULL STOP, LATIN CAPITAL LETTER V
** EOT **
Unified with ascii verbose 2
01_1.txt
01_2.txt
-au0 -v2 --no-header
3,3c3,3
-usu. Ad duo posse theophrastus>,< >v<im in accumsan
- -- verbose : COMMA, LATIN SMALL LETTER V
+usu. Ad duo posse theophrastus>.< >V<im in accumsan
+ -- verbose : FULL STOP, LATIN CAPITAL LETTER V
** EOT **
Unified with unicode verbose 2
01_1.txt
01_2.txt
-u0 -v2 --no-header
3,3c3,3
-usu. Ad duo posse theophrastusâ±,â° â±vâ°im in accumsan
- -- verbose : COMMA, LATIN SMALL LETTER V
+usu. Ad duo posse theophrastusâ±.â° â±Vâ°im in accumsan
+ -- verbose : FULL STOP, LATIN CAPITAL LETTER V
** EOT **
( run in 0.258 second using v1.01-cache-2.11-cpan-88abd93f124 )