- SEE ALSO
- COPYRIGHT AND LICENSE
diffwc - diff + /w/ord highlighting + /c/olor
This document describes version 0.004 of diffwc (from Perl distribution App-diffwc), released on 2018-02-26.
Use as you would use diff (the coloring and word highlighting currently will only be shown if you use the unified format):
% diffwc -u file1 file2 % diffwc -ruN My-Dist-0.001 My-Dist-0.002
To alias diff to diffwc, in your shell startup file:
Sample screenshot (using the Firenze color scheme):
This is a wrapper for the GNU command-line utility diff. It adds word highlighting and colors (note that GNU diff 3.4 or later supports
This script has shell tab completion capability with support for several shells.
To activate bash completion for this script, put:
complete -C diffwc diffwc
in your bash startup (e.g.
~/.bashrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is recommended, however, that you install modules using cpanm-shcompgen which can activate shell completion for scripts immediately.
To activate tcsh completion for this script, put:
complete diffwc 'p/*/`diffwc`/'
in your tcsh startup (e.g.
~/.tcshrc). Your next shell session will then recognize tab completion for the command. Or, you can also directly execute the line above in your shell to activate immediately.
It is also recommended to install
shcompgen (see above).
For fish and zsh, install
shcompgen as described above.
String. Will search color themes in
App::diffwc::ColorTheme::* as well as
Please visit the project's homepage at https://metacpan.org/release/App-diffwc.
Source repository is at https://github.com/perlancar/perl-App-diffwc.
Please report any bugs or feature requests on the bugtracker website https://rt.cpan.org/Public/Dist/Display.html?Name=App-diffwc
When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature.
https://github.com/walles/riff, a Ruby-based utility by which this utility is inspired. riff is more git-oriented: it uses the same color scheme from git while diffwc comes with its own color schemes. riff comes only as a filter, while this package offers a diff wrapper (diffwc) as well as filter (diffwc-filter-u). riff currently has problems dealing with non-unified outputs or multiline word highlighting, and also it does not feel like a typical Unix utility to me (no manpages, for example), so I made diffwc instead.
diffwc-filter-u from the same package, in the form of diff output filter.
This software is copyright (c) 2018, 2017 by firstname.lastname@example.org.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.