mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-03 06:41:14 -03:00
fish_config theme save: don't add --theme=$theme marker nor react to colortheme
The theme marker is set by "fish_config theme choose" to allow us to react to terminal color theme changes, and to tell future "fish_config theme choose" invocations which variables it should erase -- it should not erase color variables not set in the theme file, like Git prompt colors. I'm not sure if either really makes sense for "fish_config theme save". Reacting to terminal color theme changes is weird for universals. I'm not sure if "fish_config theme save" should erase universal variables that are not defined in the theme. Historically, it did so for a hardcoded list of colors, which is hacky. For now let's err on the side of leaving around color variables. The "save" subcommand is deprecated; it's possible that this changes in future (and we add support for "--theme" to it) but I'm not sure if we have enough need for that.
This commit is contained in:
@@ -217,9 +217,8 @@ echo >$__fish_config_dir/themes/custom-from-userconf.theme \
|
||||
|
||||
echo yes | fish_config theme save default
|
||||
set -S fish_color_normal
|
||||
# CHECK: $fish_color_normal: set in universal scope, unexported, with 2 elements
|
||||
# CHECK: $fish_color_normal: set in universal scope, unexported, with 1 elements
|
||||
# CHECK: $fish_color_normal[1]: |normal|
|
||||
# CHECK: $fish_color_normal[2]: |--theme=default|
|
||||
}
|
||||
|
||||
fish_config theme dump badarg
|
||||
|
||||
Reference in New Issue
Block a user