App-ccdiff
view release on metacpan or search on metacpan
lib/App/ccdiff.pm view on Meta::CPAN
Defines the character used to indicate omitted text in large unchanged text
when C<--ellipsis>/C<-e> is in effect.
This character is not equally well visible on all terminals or in all fonts,
so you might want to change it to something that stands out better in your
environment. Possible suggestions:
⦠U+2026 HORIZONTAL ELLIPSIS
â´ U+2034 TRIPLE PRIME
â· U+2037 REVERSED TRIPLE PRIME
â U+2194 LEFT RIGHT ARROW
â U+21ad LEFT RIGHT WAVE ARROW
â® U+21ae LEFT RIGHT ARROW WITH STROKE
â¹ U+21b9 LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR
â U+21c4 RIGHTWARDS ARROW OVER LEFTWARDS ARROW
â U+21c6 LEFTWARDS ARROW OVER RIGHTWARDS ARROW
â U+21ce LEFT RIGHT DOUBLE ARROW WITH STROKE
â U+21d4 LEFT RIGHT DOUBLE ARROW
â¹ U+21f9 LEFT RIGHT ARROW WITH VERTICAL STROKE
â¼ U+21fc LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE
â¿ U+21ff LEFT RIGHT OPEN-HEADED ARROW
â U+224b TRIPLE TILDE
â U+2504 BOX DRAWINGS LIGHT TRIPLE DASH HORIZONTAL
â
U+2505 BOX DRAWINGS HEAVY TRIPLE DASH HORIZONTAL
â U+2508 BOX DRAWINGS LIGHT QUADRUPLE DASH HORIZONTAL
â U+2509 BOX DRAWINGS HEAVY QUADRUPLE DASH HORIZONTAL
â§» U+29fb TRIPLE PLUS
⬠U+2b0c LEFT RIGHT BLACK ARROW
=item chr_eli_v
chr_eli_v : U+21A4U+21A6
When using C<--ellipsis> with C<--verbose> level 2 or up, the single character
indicator will be replaced with this character. If it is 2 characters wide, the
length of the compressed part is put between the characters.
A suggested alternative might be U+21E4U+21E5
=item iwbZusePP
As L<Algorithm::Diff::XS> is fast but is not 100% drop-in compliant with
L<Algorithm::Diff> and options C<-i>, C<-w>, C<-b>, and C<-Z> are likely to
not work in the C<XS> version, this option allows automatic switching to
the slower version if any of these options is selected.
=back
=head1 Git integration
You can use ccdiff to show diffs in git. It may work like this:
$ git config --global diff.tool ccdiff
$ git config --global difftool.prompt false
$ git config --global difftool.ccdiff.cmd 'ccdiff --utf-8 -u -r $LOCAL $REMOTE'
$ git difftool SHA~..SHA
$ wget https://github.com/Tux/App-ccdiff/raw/master/Files/git-ccdiff \
-O ~/bin/git-ccdiff
$ perl -pi -e 's{/pro/bin/perl}{/usr/bin/env perl}' ~/bin/git-ccdiff
$ chmod 755 ~/bin/git-ccdiff
$ git ccdiff SHA
Of course you can use C<curl> instead of C<wget> and you can choose your own
(fixed) path to C<perl> instead of using C</usr/bin/env>.
From then on you can do
$ git ccdiff
$ git ccdiff 5c5a39f2
=head1 CAVEATS
Due to the implementation, where both sides of the comparison are completely
kept in memory, this tool might not be able to deal with (very) large datasets.
=head2 Speed
There are situations where L<Algorithm::Diff> takes considerably more time
compared to e.g. GNU diff. Installing L<Algorithm::Diff::XS> will make
C<ccdiff> a lot faster. C<ccdiff> will choose L<Algorithm::Diff::XS> if
available.
Note however that options like C<-i>, C<-w>, C<-b>, and C<-Z> are likely to
be a no-op in L<Algorithm::Diff::XS>, as that has not been implemented and
it is rather unlikely it will be. Choose C<--dc=pp> then. If you want this
switch always, set C<iwbZusePP = 1> in one of your L</Configuration files>.
=head1 SEE ALSO
L<Algorithm::Diff::XS>, L<Algorithm::Diff>, L<Text::Diff>
=head1 AUTHOR
H.Merijn Brand
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2018-2026 H.Merijn Brand. All rights reserved.
This library is free software; you can redistribute and/or modify it under
the same terms as The Artistic License 2.0.
=for elvis
:ex:se gw=75|color guide #ff0000:
=cut
( run in 0.484 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )