Fix the default colors to use 39, the default foreground color (#2904)

This commit is contained in:
taoky authored and GitHub committed 2023-09-22 09:18:41 +09:00
1 parent de1c10ca8a
commit 8f81668014
5 files changed
+17 -17

No files matched your search

+1 -1
View File
@@ -3677,7 +3677,7 @@ sections:
- color for object keys - color for object keys
The default color scheme is the same as setting The default color scheme is the same as setting
`JQ_COLORS="0;90:0;37:0;37:0;37:0;32:1;37:1;37:1;34"`. `JQ_COLORS="0;90:0;39:0;39:0;39:0;32:1;39:1;39:1;34"`.
This is not a manual for VT100/ANSI escapes. However, each of This is not a manual for VT100/ANSI escapes. However, each of
these color specifications should consist of two numbers separated these color specifications should consist of two numbers separated
+1 -1
View File
@@ -3343,7 +3343,7 @@ sections:
- color for objects - color for objects
The default color scheme is the same as setting The default color scheme is the same as setting
`"JQ_COLORS=1;30:0;37:0;37:0;37:0;32:1;37:1;37"`. `"JQ_COLORS=1;30:0;39:0;39:0;39:0;32:1;39:1;39"`.
This is not a manual for VT100/ANSI escapes. However, each of This is not a manual for VT100/ANSI escapes. However, each of
these color specifications should consist of two numbers separated these color specifications should consist of two numbers separated
Generated
+2 -2
View File
@@ -1,5 +1,5 @@
. .
.TH "JQ" "1" "August 2023" "" "" .TH "JQ" "1" "September 2023" "" ""
. .
.SH "NAME" .SH "NAME"
\fBjq\fR \- Command\-line JSON processor \fBjq\fR \- Command\-line JSON processor
@@ -4058,7 +4058,7 @@ color for object keys
.IP "" 0 .IP "" 0
. .
.P .P
The default color scheme is the same as setting \fBJQ_COLORS="0;90:0;37:0;37:0;37:0;32:1;37:1;37:1;34"\fR\. The default color scheme is the same as setting \fBJQ_COLORS="0;90:0;39:0;39:0;39:0;32:1;39:1;39:1;34"\fR\.
. .
.P .P
This is not a manual for VT100/ANSI escapes\. However, each of these color specifications should consist of two numbers separated by a semi\-colon, where the first number is one of these: This is not a manual for VT100/ANSI escapes\. However, each of these color specifications should consist of two numbers separated by a semi\-colon, where the first number is one of these:
+2 -2
View File
@@ -30,8 +30,8 @@
static char color_bufs[8][16]; static char color_bufs[8][16];
static const char *color_bufps[8]; static const char *color_bufps[8];
static const char* def_colors[] = static const char* def_colors[] =
{COL("0;90"), COL("0;37"), COL("0;37"), COL("0;37"), {COL("0;90"), COL("0;39"), COL("0;39"), COL("0;39"),
COL("0;32"), COL("1;37"), COL("1;37"), COL("1;34")}; COL("0;32"), COL("1;39"), COL("1;39"), COL("1;34")};
#define FIELD_COLOR (colors[7]) #define FIELD_COLOR (colors[7])
static const char **colors = def_colors; static const char **colors = def_colors;
+11 -11
View File
@@ -438,18 +438,18 @@ cmp $d/color $d/expect
## Default colors, complex input ## Default colors, complex input
$JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color $JQ -Ccn '[{"a":true,"b":false},123,null]' > $d/color
{ {
printf '\033[1;37m[\033[1;37m{' printf '\033[1;39m[\033[1;39m{'
printf '\033[0m\033[1;34m"a"\033[' printf '\033[0m\033[1;34m"a"\033['
printf '0m\033[1;37m:\033[0m\033[' printf '0m\033[1;39m:\033[0m\033['
printf '0;37mtrue\033[0m\033[1' printf '0;39mtrue\033[0m\033[1'
printf ';37m,\033[0m\033[1;34m' printf ';39m,\033[0m\033[1;34m'
printf '"b"\033[0m\033[1;37m:\033' printf '"b"\033[0m\033[1;39m:\033'
printf '[0m\033[0;37mfalse\033' printf '[0m\033[0;39mfalse\033'
printf '[0m\033[1;37m\033[1;37' printf '[0m\033[1;39m\033[1;39'
printf 'm}\033[0m\033[1;37m,\033[' printf 'm}\033[0m\033[1;39m,\033['
printf '0;37m123\033[0m\033[1;' printf '0;39m123\033[0m\033[1;'
printf '37m,\033[0;90mnull\033' printf '39m,\033[0;90mnull\033'
printf '[0m\033[1;37m\033[1;37' printf '[0m\033[1;39m\033[1;39'
printf 'm]\033[0m\n' printf 'm]\033[0m\n'
} > $d/expect } > $d/expect
cmp $d/color $d/expect cmp $d/color $d/expect