dandavison / delta

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

🐛 `--color-only` doesn't produce any colour #1571

Closed HaleTom closed 7 months ago

HaleTom commented 7 months ago

Command:

/bin/diff HOME.vimrc-2020-08-11 vimrc-committed | delta --color-only --config /dev/null

Output:

image

I want to use delta as a git --diff-filter, or just to colour diffs produced by standard diff. How do I do that?

dandavison commented 7 months ago

Hi @HaleTom, diff without arguments does not produce unified diff output, so pass the -u flag when piping diff output into delta. delta parses unified diff and git diff output. To use it with git, see https://github.com/dandavison/delta#get-started.

HaleTom commented 7 months ago

Thanks @dandavison for explaining!