From 85ac91eb2b84e29cb37e1ab118c23e07fdaaf742 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sun, 4 Jan 2026 12:41:31 +0100 Subject: [PATCH] fish_config theme choose: fix Tomorrow always using light version The backward compat hack canonicalization caused us to always treat "tomorrow" light theme. Restrict this hack to the legacy name (Tomorrow); don't do it when the new canonical name (tomorrow) is used. The same issue does not affect other themes because their legacy names always have a "light" or 'dark' suffix, which means that the canonical name is different, so the legacy hacks don't affect the canonical name. Fixes #12266 --- CHANGELOG.rst | 1 + share/functions/fish_config.fish | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1d54b53d0..2c99ca93c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ This release fixes the following problems identified in fish 4.3.0: - Selecting a completion could insert only part of the token (:issue:`12249`). - Glitch with soft-wrapped autosuggestions and :doc:`cmds/fish_right_prompt` (:issue:`12255`). - Spurious echo in tmux when typing a command really fast (:issue:`12261`). +- ``tomorrow`` theme always using the light variant (:issue:`12266`). - The sample prompts and themes are correctly installed (:issue:`12241`). - Last line of command output could be hidden when missing newline (:issue:`12246`). diff --git a/share/functions/fish_config.fish b/share/functions/fish_config.fish index 43b02a449..ccfd6dce4 100644 --- a/share/functions/fish_config.fish +++ b/share/functions/fish_config.fish @@ -401,6 +401,9 @@ function __fish_config_theme_canonicalize --no-scope-shadowing None Nord 'Old School' Seaweed 'Snow Day' \ 'Solarized Dark' 'Solarized Light' \ 'Tomorrow Night Bright' 'Tomorrow Night' Tomorrow + if test $theme_name = Tomorrow + set color_theme light + end set theme_name (string lower (string replace -a " " "-" $theme_name)) end switch $theme_name @@ -409,8 +412,6 @@ function __fish_config_theme_canonicalize --no-scope-shadowing base16-default-dark base16-default-light \ solarized-dark solarized-light string match -rq -- '^(?.*)-(?dark|light)$' $theme_name - case tomorrow - set color_theme light case tomorrow-night set theme_name tomorrow set color_theme dark