mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-19 18:01:15 -03:00
As reported in https://github.com/fish-shell/fish-shell/issues/11325, we have logic that
implicitly activates bold mode.
Even worse: the test case from https://github.com/fish-shell/fish-shell/issues/11426 shows that
we're not even consistent about that.
To reproduce, use
set -g fish_pager_color_background --background=fff
set -g fish_pager_color_prefix --underline --bold 000
set -g fish_pager_color_completion
set -g fish_pager_color_description
complete : -s a -l all -d asdf
and type ": -" <TAB>
The second prefix is underlined but not bold,
because the implicit bold mode has a subtle bug.
Now if we were to fix this, using
diff --git a/src/terminal.rs b/src/terminal.rs
index b86a7d85fe..7791d34936 100644
--- a/src/terminal.rs
+++ b/src/terminal.rs
@@ -589,7 +589,7 @@
// Lastly, we set bold, underline, italics, dim, and reverse modes correctly.
if style.is_bold()
&& !self.last.style.is_bold()
- && !bg_set
+ && !(bg_set && !last_bg_set)
&& self.write_command(EnterBoldMode)
{
self.last.style.bold = true;
that would make the description bold as well, which would probably cause chaos.
Either way, it seems wrong to expand this hack.
Let's remove it.
For better or worse, we can't safely update the default theme yet on
an existing user's machine, because we have set universal variables.
This means that fish_color_search_match and fish_pager_color_progress on
existing installations are no longer bold. That's probably acceptable.
The former was hard to read for the longest time, until 9af6a64fd2 (Fix
bad contrast in search match highlighting, 2024-04-15). The progress info
is probably not a big deal.
Attentive users may run "fish_config theme choose 'fish default'". Perhaps
we should tell them on upgrade?
Closes #11325
34 lines
1.0 KiB
Plaintext
34 lines
1.0 KiB
Plaintext
# name: 'Tomorrow'
|
|
# preferred_background: white
|
|
# url: 'https://github.com/chriskempson/tomorrow-theme'
|
|
|
|
fish_color_normal normal
|
|
fish_color_command 8959a8
|
|
fish_color_quote 718c00
|
|
fish_color_redirection 3e999f
|
|
fish_color_end 8959a8
|
|
fish_color_error c82829
|
|
fish_color_param 4271ae
|
|
fish_color_comment eab700
|
|
fish_color_selection white --background=brblack --bold
|
|
fish_color_search_match white --background=brblack --bold
|
|
fish_color_history_current --bold
|
|
fish_color_operator 00a6b2
|
|
fish_color_escape 00a6b2
|
|
fish_color_cwd green
|
|
fish_color_cwd_root red
|
|
fish_color_valid_path --underline
|
|
fish_color_autosuggestion 8e908c
|
|
fish_color_host normal
|
|
fish_color_user brgreen
|
|
fish_pager_color_description B3A06D yellow
|
|
fish_pager_color_completion normal
|
|
fish_color_cancel -r
|
|
fish_pager_color_prefix normal --bold --underline
|
|
fish_pager_color_progress brwhite --background=cyan --bold
|
|
fish_pager_color_selected_background --background=brblack
|
|
fish_color_option 4271ae
|
|
fish_color_keyword 8959a8
|
|
fish_color_host_remote yellow
|
|
fish_color_status red
|