Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
yang opened this issue May 16, 2024 · 4 comments
Closed

Comments

@yang
Copy link

yang commented May 16, 2024

.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
Copy link
Contributor

bash commented May 16, 2024

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
Copy link
Author

yang commented May 16, 2024

That did it, thank you!

@bash
Copy link
Contributor

bash commented Aug 16, 2024

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.

@th1000s
Copy link
Collaborator

th1000s commented Sep 2, 2024

Nice, thanks @bash!

@th1000s th1000s closed this as completed Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants