-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Null values barely readable on dark backgrounds #1972
Comments
Does the information provided at the following link help? https://stackoverflow.com/questions/51338701/how-do-i-customize-the-colors-used-by-jq-c |
Yes, I can customize colours both in |
TLDR If anyone's reading this, setting this environment variable will switch your black bold invisible export JQ_COLORS='0;31:0;39:0;39:0;39:0;32:1;39:1;39' The part affecting this is the initial characters |
Regardless, I also think jq should identify default colors and provide sane defaults. Unfortunate this has to be done manually. |
I can confirm that the null does not show up in Alacritty's default colorscheme and the Gruvbox colorscheme in Alacritty and Neovim's internal terminal when using the Gruvbox theme. |
I'm seeing the same issue on Kitty - Terminal Emulator. |
lol, I was about to make a issue asking why jq prints a empty string to terminal but prints "null" if I have it in a pipe/subshell |
Same here. Although I've been working with Jq for a while, it's only now that I stumbled upon this output where I knew that I was confused whether this is an issue with Jq or my terminal. I didn't even think that this could be an issue with the default colour because I couldn't imagine that someone would choose black for output in terminals which traditionally have a dark background. |
Does non-bold-bright-foreground-black (90) look ok with default colors for kitty, alacritty and neovim? Can try with: echo -e '\0x1b[90mnull\0x1b[0m'
# or
JQ_COLORS='0;90:0;39:0;39:0;39:0;32:1;39:1;39' jq -n . That is was gojq uses. For iterm2 and macOS Terminal.app it looks dark greyish. |
Side note: ❯ jq --version
jq-1.6 |
Found this while poking around #2032 it used to be 39 |
Ah, I see, 1.6 has been released two years prior to that change and I didn't notice that I was reading the development version documentation. However, the documentation for 1.6 also mentions 37. In any case thanks for clarifying! |
Description
On Fedora 30, using the default settings on Gnome Terminal (dark background, Tango colorscheme),
null
values are almost invisible.To Reproduce
Install a vanilla Fedora 30 distribution.
Install
jq
from Fedora repositories:dnf install jq
.Display a JSON document with a
null
value in it.See how the
null
value text is barely visible (dark on dark background).Expected behavior
Every value in the JSON document printed by
jq
should be clearly visible on any Linux distribution, especially popular ones, and especially using default settings.Environment
The text was updated successfully, but these errors were encountered: