delta icon indicating copy to clipboard operation
delta copied to clipboard

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

Open yang opened this issue 1 year ago • 3 comments

.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.)

yang avatar May 16 '24 21:05 yang

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.

bash avatar May 16 '24 22:05 bash

That did it, thank you!

yang avatar May 16 '24 22:05 yang

This should be fixed now that 0.18.0 has been released.

Automatic color detection is now disabled in screen, so the --dark / --light workaround isn't needed anymore.

bash avatar Aug 16 '24 15:08 bash

Nice, thanks @bash!

th1000s avatar Sep 02 '24 21:09 th1000s