From fc7ecf702050dc25458680a15b792c1521dc814d Mon Sep 17 00:00:00 2001 From: itchyny Date: Sat, 5 Aug 2023 19:18:07 +0900 Subject: [PATCH] Change the default color of null to Bright Black --- NEWS.md | 4 ++-- docs/content/manual/manual.yml | 2 +- jq.1.prebuilt | 2 +- src/jv_print.c | 2 +- tests/shtest | 18 +++++++++--------- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/NEWS.md b/NEWS.md index b8e4c6828e..d2ca6a84c5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -26,8 +26,8 @@ Full commit log can be found at $d/color -printf '\033[1;30mnull\033[0m\n' > $d/expect +printf '\033[0;90mnull\033[0m\n' > $d/expect cmp $d/color $d/expect ## Set non-default color, null input @@ -438,27 +438,27 @@ $JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color printf '[0m\033[1;37m\033[1;37' printf 'm}\033[0m\033[1;37m,\033[' printf '0;37m123\033[0m\033[1;' - printf '37m,\033[1;30mnull\033' + printf '37m,\033[0;90mnull\033' printf '[0m\033[1;37m\033[1;37' printf 'm]\033[0m\n' } > $d/expect cmp $d/color $d/expect ## Set non-default colors, complex input -JQ_COLORS='1;30:0;31:0;32:0;33:0;34:1;35:1;36:1;30' \ +JQ_COLORS='0;30:0;31:0;32:0;33:0;34:1;35:1;36:1;37' \ $JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color { printf '\033[1;35m[\033[1;36m{' - printf '\033[0m\033[1;30m"a"\033[' + printf '\033[0m\033[1;37m"a"\033[' printf '0m\033[1;36m:\033[0m\033[' printf '0;32mtrue\033[0m\033[1' - printf ';36m,\033[0m\033[1;30m' + printf ';36m,\033[0m\033[1;37m' printf '"b"\033[0m\033[1;36m:\033' printf '[0m\033[0;31mfalse\033' printf '[0m\033[1;36m\033[1;36' printf 'm}\033[0m\033[1;35m,\033[' printf '0;33m123\033[0m\033[1;' - printf '35m,\033[1;30mnull\033' + printf '35m,\033[0;30mnull\033' printf '[0m\033[1;35m\033[1;35' printf 'm]\033[0m\n' } > $d/expect @@ -503,16 +503,16 @@ if command -v script >/dev/null 2>&1; then fi faketty $JQ -n . > $d/color - printf '\033[1;30mnull\033[0m\r\n' > $d/expect + printf '\033[0;90mnull\033[0m\r\n' > $d/expect cmp $d/color $d/expect NO_COLOR= faketty $JQ -n . > $d/color - printf '\033[1;30mnull\033[0m\r\n' > $d/expect + printf '\033[0;90mnull\033[0m\r\n' > $d/expect cmp $d/color $d/expect NO_COLOR=1 faketty $JQ -n . > $d/color printf 'null\r\n' > $d/expect cmp $d/color $d/expect NO_COLOR=1 faketty $JQ -Cn . > $d/color - printf '\033[1;30mnull\033[0m\r\n' > $d/expect + printf '\033[0;90mnull\033[0m\r\n' > $d/expect cmp $d/color $d/expect fi