-
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
Make field colors configurable #2638
Conversation
Allow object key colors to be configured with the "JQ_COLORS" environment variable. This is a updated version of a [GitHub pull request created by David Haguenauer](#1791). Since the prebuilt manual already needed to be updated, this change also fixes in omission in <cf61515> in which "39" in "JQ_COLORS" should have been replaced with "37".
I also wrote a script called jqcolors that's analagous to dircolors that I could include in a separate PR if you'd accept it: https://github.com/ericpruitt/emus/blob/master/scripts/jqcolors. Example file:
|
@@ -293,20 +293,44 @@ if [ "$($VALGRIND $Q $JQ -n '{"a":"xyz"} | halt_error(1)' 2>&1)" != '{"a":"xyz"} | |||
fi | |||
|
|||
# Check $JQ_COLORS | |||
## Default colors, null input | |||
$JQ -Ccn . > $d/color |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please prepend JQ_COLORS=
this line and L307. make check
fails when exporting the environment variable.
@@ -13,7 +13,8 @@ typedef enum { | |||
JV_KIND_NUMBER, | |||
JV_KIND_STRING, | |||
JV_KIND_ARRAY, | |||
JV_KIND_OBJECT | |||
JV_KIND_OBJECT, | |||
JV_KIND_FIELD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see #1791 (comment).
…qlang#2638) Co-authored-by: David Haguenauer <[email protected]> Co-authored-by: Eric Pruitt <[email protected]>
…qlang#2638) Co-authored-by: David Haguenauer <[email protected]> Co-authored-by: Eric Pruitt <[email protected]>
…qlang#2638) Co-authored-by: David Haguenauer <[email protected]> Co-authored-by: Eric Pruitt <[email protected]>
Co-authored-by: David Haguenauer <[email protected]> Co-authored-by: Eric Pruitt <[email protected]>
Allow object key colors to be configured with the "JQ_COLORS" environment variable. This is a updated version of a GitHub pull request created by David
Haguenauer. Since the prebuilt manual already needed to be updated, this change also fixes in omission in cf61515 in which "39" in "JQ_COLORS" should have been replaced with "37".