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

bat does not show color, even with --color=always when used with watch --color #1681

Closed
maxnoe opened this issue Jun 8, 2021 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@maxnoe
Copy link

maxnoe commented Jun 8, 2021

When using

watch -n1 --color 'bat some_file.py --color=always'

I get no colors. Colors work for e.g. watch -n1 --color 'git log --color=always' and when not using watch

Manjaro, bat 0.18.1, tested in kitty and konsole terminals

@maxnoe maxnoe added the bug Something isn't working label Jun 8, 2021
@Enselic
Copy link
Collaborator

Enselic commented Jun 8, 2021

Thanks for taking the time to write a bug report! This is however due to a limitation of watch, which does not support 8-bit colors and above yet. See https://gitlab.com/procps-ng/procps/-/issues/44.

If you add --theme=ansi to your bat command, you will get colors. This theme use 3-bit colors. git log works out of the box because it always uses 3-bit colors.

It is worth noting that not even --theme=base16 is fully supported. Its 3-bit colors work, but its 4-bit-specific colors are ignored.

@maxnoe
Copy link
Author

maxnoe commented Jun 8, 2021

Thanks, that works nicely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants