themes/default: revert to palette colors for now

The readability concern in ed881bcdd8 (Make default theme use named
colors only, 2023-07-25) was no longer relevant, but people might
prefer we use terminal colors by default, because other apps do too,
and because it's a well-known way to make colors look good across
both dark and light mode.

If we revert this, we should make sure fish_default_mode_prompt.fish
and prompt_login.fish also use RGB colors
This commit is contained in:
Johannes Altmanninger
2025-12-27 11:51:39 +01:00
parent 92db03ac9f
commit 4bb0d956eb
5 changed files with 113 additions and 82 deletions

View File

@@ -19,7 +19,7 @@ echo no default universal variables
# Existing universal variables are migrated as-is.
{
echo yes | fish_config theme save default --color-theme=light
echo yes | fish_config theme save default-rgb --color-theme=light
fake-old-uvars
set -U fish_key_bindings fish_vi_key_bindings
set -U | head -2
@@ -60,7 +60,7 @@ echo no default universal variables
# If existing universal colors match old defaults exactly (common case), don't migrate but
# delete them.
{
echo yes | fish_config theme save default --color-theme=unknown
echo yes | fish_config theme save default
fake-old-uvars
provoke-migration
$fish -c __fish_theme_migrate

View File

@@ -131,21 +131,21 @@ fish_config theme list | string match -r \
# CHECK: tomorrow-night-bright
# CHECK: tomorrow
fish_config theme show default
fish_config theme show default-rgb
# CHECK: {{\x1b\[m}}{{\x1b\[4m}}Current{{\x1b\[m}}
# CHECK: /bright/vixens{{\x1b\[m}} jump{{\x1b\[m}} |{{\x1b\[m}} "fowl"{{\x1b\[m}} > quack{{\x1b\[m}} &{{\x1b\[m}} # This is a comment
# CHECK: {{\x1b\[m}}echo{{\x1b\[m}} 'Errors are the portal to discovery
# CHECK: {{\x1b\[m}}Th{{\x1b\[m}}is an autosuggestion
# CHECK: {{\x1b\[m\x1b\[4mdefault \(light color theme\)\x1b\[m}}
# CHECK: {{\x1b\[m\x1b\[4mdefault-rgb \(light color theme\)\x1b\[m}}
# CHECK: {{\x1b\[38;2;0;0;238m/bright/vixens\x1b\[m \x1b\[38;2;0;160;160mjump\x1b.*}}
# CHECK: {{.*}}
# CHECK: {{.*}}
# CHECK: {{\x1b\[m\x1b\[4mdefault \(dark color theme\)\x1b\[m}}
# CHECK: {{\x1b\[m\x1b\[4mdefault-rgb \(dark color theme\)\x1b\[m}}
# CHECK: {{\x1b\[38;2;92;92;255m.*}}
# CHECK: {{.*}}
# CHECK: {{.*}}
# CHECK: {{\x1b\[m\x1b\[4mdefault \(unknown color theme\)\x1b\[m}}
# CHECK: {{\x1b\[m\x1b\[4mdefault-rgb \(unknown color theme\)\x1b\[m}}
# CHECK: {{\x1b\[m/bright/vixens\x1b\[m \x1b\[36mjump\x1b\[m.*}}
# CHECK: {{.*}}
# CHECK: {{.*}}
@@ -156,10 +156,10 @@ fish_config theme show ayu | string match -r '^.*ayu.*'
mkdir $__fish_config_dir/themes
touch $__fish_config_dir/themes/custom-from-userconf.theme
fish_config theme show | grep -E 'default|base16-default|custom-from-userconf'
# CHECK: {{.*}}default (light color theme){{\x1b\[m}}
# CHECK: {{.*}}default (dark color theme){{\x1b\[m}}
# CHECK: {{.*}}default (unknown color theme){{\x1b\[m}}
fish_config theme show | grep -E 'default-rgb|base16-default|custom-from-userconf'
# CHECK: {{.*}}default-rgb (light color theme){{\x1b\[m}}
# CHECK: {{.*}}default-rgb (dark color theme){{\x1b\[m}}
# CHECK: {{.*}}default-rgb (unknown color theme){{\x1b\[m}}
# CHECK: {{.*}}custom-from-userconf (unknown color theme){{\x1b\[m}}
# CHECK: {{.*}}base16-default (light color theme){{\x1b\[m}}
# CHECK: {{.*}}base16-default (dark color theme){{\x1b\[m}}