-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Description
fish --version : current git build (3.2.0-44-g4218c1f1a-dirty)
OS: ArchLinux, terminals: all
Problem: set_color --print-colors outputs every named color (except 'normal') in bold, even the non-br-ones. For colorschemes that define dedicated "bright" colors, this is inaccurate. It also means that the --dim switch does not work (it gets converted to bold+dim = bold font, but in normal color).
I patched builtin_set_colors.cpp to print the escape sequences to pipes/files, this yields:
$set_color --print-colors | string escape
\e\[1m\e\[30mblack
\e\[1m\e\[34mblue
\e\[1m\e\[90mbrblack
\e\[1m\e\[94mbrblue
\e\[1m\e\[96mbrcyan
\e\[1m\e\[92mbrgreen
\e\[1m\e\[95mbrmagenta
\e\[1m\e\[91mbrred
\e\[1m\e\[97mbrwhite
\e\[1m\e\[93mbryellow
\e\[1m\e\[36mcyan
\e\[1m\e\[32mgreen
\e\[1m\e\[35mmagenta
\e\[1m\e\[31mred
\e\[1m\e\[37mwhite
\e\[1m\e\[33myellow
\e\[1m\e\[30m\e\(B\e\[mnormal
and
$ set_color --print-colors --dim | string escape
\e\[2m\e\[1m\e\[30mblack
\e\[2m\e\[1m\e\[34mblue
\e\[2m\e\[1m\e\[90mbrblack
\e\[2m\e\[1m\e\[94mbrblue
\e\[2m\e\[1m\e\[96mbrcyan
\e\[2m\e\[1m\e\[92mbrgreen
\e\[2m\e\[1m\e\[95mbrmagenta
\e\[2m\e\[1m\e\[91mbrred
\e\[2m\e\[1m\e\[97mbrwhite
\e\[2m\e\[1m\e\[93mbryellow
\e\[2m\e\[1m\e\[36mcyan
\e\[2m\e\[1m\e\[32mgreen
\e\[2m\e\[1m\e\[35mmagenta
\e\[2m\e\[1m\e\[31mred
\e\[2m\e\[1m\e\[37mwhite
\e\[2m\e\[1m\e\[33myellow
\e\[2m\e\[1m\e\[30m\e\(B\e\[mnormal
(edit: changed od -c to string escape)
This confirms it's not an issue with my terminal config, but fish sending wrong escape codes.
(Note: I had a quick glance at the code, but couldn't fix the issue myself. But I saw a comment in output.cpp that bold mode is always entered for readability reasons, that might be related?)