dandavison / delta

A syntax-highlighting pager for git, diff, grep, and blame output
https://dandavison.github.io/delta/
MIT License
21.82k stars 364 forks source link

🚀 Is there a way for delta to ignore changes ? Like --ignore-matching-lines from diff #1506

Open jcgutier opened 1 year ago

jcgutier commented 1 year ago

Is there a way for delta to ignore changes ?

I'm looking on a similar behavior like diff with flag --ignore-matching-lines

dandavison commented 1 year ago

Hi @jcgutier, how about

git diff --no-index --ignore-matching-lines file_a file_b | delta

or if you're using delta with git then simply

git diff --ignore-matching-lines | delta
jcgutier commented 1 year ago

Hello @dandavison thanks for your reply.

I'm using the delta CLI in standalone mode.

My main goal was to see the differences from kubectl diff with a pipe to delta. And because kubectl shows some metadata changes that are not relevant for me I was trying to ignore those changes.

like I would like to ignore changes for generation, for example: Untitled