Skip to content

Add restrict option #220

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

desmogix
Copy link

@desmogix desmogix commented May 3, 2025

Allow controlling the colouring via a regular expression provided on the command line. This is particularly helpful when some differences in the text are expected and yet not of interest. Examples for such use cases are memory dumps containing volatile runtime addresses, log files containing timestamps, generated text of any sort whose contents only partially match.

Smoke tests are included in the PR, for a more real world show case can try:

./icdiff --restrict="\).+" <(git blame master -- icdiff) <(git blame HEAD -- icdiff) | less -r

where HEAD is anything other than master of course.


As a side note, requirements.txt might need uprev-ing - had issues with the current version of pyflakes on u24.04

ls added 4 commits May 3, 2025 13:18
This option allows to tell icdiff to only color part of a line. Furhtermore
allowing to reduce the visual noise generated by unwanted, or by perhaps
expected, or by possibly irrelevant differences in the text being compared.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant