Files
fish-shell/share/tools/web_config/themes/Lava.theme
Johannes Altmanninger c8f2471357 Stop --background=somecolor from implicitly setting the bold modifier
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
2025-04-29 13:31:13 +02:00

33 lines
975 B
Plaintext

# name: 'Lava'
# preferred_background: 232323
fish_color_normal normal
fish_color_command FF9400
fish_color_quote BF9C30
fish_color_redirection BF5B30
fish_color_end FF4C00
fish_color_error FFDD73
fish_color_param FFC000
fish_color_comment A63100
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 FFC473
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 FFC000
fish_color_keyword FF9400
fish_color_host_remote yellow
fish_color_status red