diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 1f0d0cd17..670becbbe 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ Notable improvements and fixes Deprecations and removed features --------------------------------- +- The default theme (i.e. the ``fish_color_*`` variables) is no longer set in non-interactive shells. Interactive improvements ------------------------ diff --git a/share/config.fish b/share/config.fish index dbd13cfee..3f4ca64de 100644 --- a/share/config.fish +++ b/share/config.fish @@ -206,8 +206,8 @@ end if status is-interactive __fish_migrate + fish_config theme choose default --no-override end -fish_config theme choose default --no-override # As last part of initialization, source the conf directories. # Implement precedence (User > Admin > Extra (e.g. vendors) > Fish) by basically doing "basename". diff --git a/tests/checks/__fish_migrate.fish b/tests/checks/__fish_migrate.fish index 94464b700..af733401a 100644 --- a/tests/checks/__fish_migrate.fish +++ b/tests/checks/__fish_migrate.fish @@ -78,6 +78,7 @@ echo no default universal variables # Labeled color variables may be updated by fish. { $fish -c ' + fish_config theme choose default set -g fish_color_autosuggestion red set -g fish_color_command green --theme=default __fish_migrate diff --git a/tests/checks/fish_config.fish b/tests/checks/fish_config.fish index 7eb2a3974..3c4d9302a 100644 --- a/tests/checks/fish_config.fish +++ b/tests/checks/fish_config.fish @@ -1,6 +1,8 @@ # RUN: %fish %s # REQUIRES: command -v diff +fish_config theme choose default + set -g fish (status fish-path) fish_config prompt list | string match -r '^(?:acidhub|disco|nim)$' diff --git a/tests/checks/functions.fish b/tests/checks/functions.fish index 4828d0ece..7c642c855 100644 --- a/tests/checks/functions.fish +++ b/tests/checks/functions.fish @@ -299,6 +299,7 @@ functions --no-details --color=never test_color_option # CHECK: echo hello # CHECK: end +fish_config theme choose default string escape (functions --no-details --color=always test_color_option) # CHECK: function\ \e\[36mtest_color_option\e\[32m # CHECK: \e\[39m\ \ \ \ echo\ \e\[36mhello\e\[32m