mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-17 16:11: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: 'Base16 Eighties'
|
|
# preferred_background: 2d2d2d
|
|
# url: 'https://github.com/chriskempson/base16-default-schemes'
|
|
|
|
fish_color_normal normal
|
|
fish_color_command 99cc99
|
|
fish_color_quote ffcc66
|
|
fish_color_redirection d3d0c8
|
|
fish_color_end cc99cc
|
|
fish_color_error f2777a
|
|
fish_color_param d3d0c8
|
|
fish_color_comment ffcc66
|
|
fish_color_selection white --background=brblack --bold
|
|
fish_color_search_match white --background=brblack --bold
|
|
fish_color_history_current --bold
|
|
fish_color_operator 6699cc
|
|
fish_color_escape 66cccc
|
|
fish_color_cwd green
|
|
fish_color_cwd_root red
|
|
fish_color_valid_path --underline
|
|
fish_color_autosuggestion 747369
|
|
fish_color_user brgreen
|
|
fish_color_host normal
|
|
fish_color_cancel -r
|
|
fish_pager_color_completion normal
|
|
fish_pager_color_description B3A06D yellow
|
|
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 d3d0c8
|
|
fish_color_keyword 99cc99
|
|
fish_color_host_remote yellow
|
|
fish_color_status red
|