dandavison / delta

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

Preserve "Binary files" line in color_only mode #1649

Closed imbrish closed 3 months ago

imbrish commented 3 months ago

Command:

printf "\33[1mdiff --git a/a b/a\33[m\n\33[1mindex 7b65664a8972..82c76465611f 100755\33[m\nBinary files a/a and b/a differ\n\33[1mdiff --git a/b b/b\33[m\n\33[1mindex 7b57bd29ea8a..4d3b8c11a4a2 100644\33[m\n\33[1m--- a/b\33[m\n\33[1m+++ b/b\33[m\n\33[36m@@ -1 +1 @@\33[m\n\33[31m-some text\33[m\n\33[32m+\33[m\33[32mother text\33[m\n" | delta --no-gitconfig --color-only

Before:

image

After:

image

Closes #320

dandavison commented 3 months ago

Great, thanks a lot!

martinetd commented 3 months ago

Thanks!

(I wish github would notify folks following an issue when someone opens a PR that fixes it, not just when it's merged...)