dandavison / delta

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

🐛 Printing special terminal control characters "^[]11;rgb:0000/0000/0000^G" #1707

Open yang opened 1 month ago

yang commented 1 month ago

.gitconfig has

[interactive]
  diffFilter = delta --color-only

Running normally is fine.

But once in GNU screen, git diff results in extra chars being printed before and after the prompt:

^[]11;rgb:0000/0000/0000^G ... 11;rgb:0000/0000/0000

image

(Similar strangeness happening with using as pager.)

bash commented 1 month ago

Hmm looks like something is going wrong with the dark/light mode detection introduced in #1615.

As a workaround you can disable this by passing --dark or --light to delta:

[interactive]
    diffFilter = delta --color-only --dark

This is likely a bug in either terminal-colorsaurus (the library delta uses to detect the terminal's color scheme) or screen.

yang commented 1 month ago

That did it, thank you!