MiSawa / xq

Pure rust implementation of jq
MIT License
333 stars 18 forks source link

Use only XQ_COLORS for colors and drop fallback to JQ_COLORS #173

Closed itchyny closed 9 months ago

itchyny commented 10 months ago

I'm bothered by Failed to set $JQ_COLORS error message on invoking xq. I configure JQ_COLORS="38;5;248:38;5;214:38;5;224:38;5;45:38;5;82:::38;5;123" and that looks unacceptable by xq. Although jq manual doesn't mention entirely about how it is handled, it accepts any semicolon-separated numbers for CSI. For example, JQ_COLORS="48;5;91" jq -n . can change the background color. Also the JQ_COLORS fallback disables to use the default colors of xq while configuring colors for jq. If we want to use the same colors, we simply can export XQ_COLORS=$JQ_COLORS.

MiSawa commented 9 months ago

SGTM, thanks!