From 3105f88622d92018c3267cdcdda8b33e411a5a63 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Sat, 27 Dec 2025 17:01:17 +0100 Subject: [PATCH] fish_config choose/save: improve docs --- CHANGELOG.rst | 13 +++++-------- doc_src/cmds/fish_config.rst | 4 +++- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index f5bbf2540..5ab437839 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -3,21 +3,17 @@ fish 4.3.0 (released ???) Deprecations and removed features --------------------------------- -- fish no longer sets :ref:`universal variables ` by default. +- fish no longer sets :ref:`universal variables ` by default, making the configuration easier to understand. Specifically, the ``fish_color_*``, ``fish_pager_color_*`` and ``fish_key_bindings`` variables are now set in the global scope by default. After upgrading to 4.3.0, fish will (once and never again) migrate these universals to globals set at startup in the ``~/.config/fish/conf.d/fish_frozen_theme.fish`` and ``~/.config/fish/conf.d/fish_frozen_key_bindings.fish`` files. - We suggest that you delete those files and :ref:`set your theme ` in your ``~/.config/fish/config.fish`` file. + We suggest that you delete those files and :ref:`set your theme ` in ``~/.config/fish/config.fish``. - You can still configure fish to propagate theme changes; see :ref:`here ` for an example. - You can still opt into storing color variables in the universal scope - (via the deprecated ``fish_config theme save``) instead. - It's no longer the recommended approach because - - 1. it is at odds with dynamic theme switching based on the terminal's color theme (see below). - 2. universal variables as a source of truth are easy to misunderstand, - compared to configuration files like ``config.fish``. + via ``fish_config theme save`` though unlike ``fish_config theme choose``, + it does not support dynamic theme switching based on the terminal's color theme (see below). - Erasing a color variable (e.g. by running ``set --erase fish_color_command``) no longer prevents fish from overwriting it with the default theme's version. To set a color to its fallback value (which is :envvar:`fish_color_normal` for most colors), @@ -71,6 +67,7 @@ Regression fixes: - (from 4.2.0) Incorrect emoji width computation on macOS. - (from 4.2.0) Mouse clicks and :kbd:`ctrl-l` edge cases in multiline command lines (:issue:`12121`). - (from 4.2.0) Completions for Git remote names on some non-glibc systems. +- (from 4.2.0) Expansion of ``~$USER``. fish 4.2.1 (released November 13, 2025) ======================================= diff --git a/doc_src/cmds/fish_config.rst b/doc_src/cmds/fish_config.rst index 18e60eece..17ec564d3 100644 --- a/doc_src/cmds/fish_config.rst +++ b/doc_src/cmds/fish_config.rst @@ -38,12 +38,14 @@ With the ``theme`` command ``fish_config`` can be used to view and choose a them Available subcommands for the ``theme`` command: - ``choose`` loads a theme in the current session. + If the theme has light and dark variants (see below), the one matching :envvar:`fish_terminal_color_theme` will be applied (also whenever that variable changes). To override :envvar:`fish_terminal_color_theme`, pass the ``--color-theme`` argument. - ``demo`` displays some sample text in the current theme. - ``dump`` prints the current theme in a loadable format. - ``list`` lists the names of the available themes. - ``show`` shows what the given themes (or all) would look like. -- *(deprecated, avoid use)* ``save`` saves the given theme to :ref:`universal variables `. +- *(not recommended)* ``save`` saves the given theme to :ref:`universal variables `. + A theme set this way will not update as :envvar:`fish_terminal_color_theme` changes. The **-h** or **--help** option displays help about using this command.