Issue
With the recent release of fish version 3.4, the fish_pager_color_selected_background variable is now set as a universal variable along with the other pager colors upon interactive initialization:
|
# Pager colors |
|
__init_uvar fish_pager_color_prefix cyan --bold --underline |
|
__init_uvar fish_pager_color_completion normal |
|
__init_uvar fish_pager_color_description B3A06D yellow -i |
|
__init_uvar fish_pager_color_progress brwhite --background=cyan |
|
__init_uvar fish_pager_color_selected_background -r |
It think this is a perfectly reasonable default, but in the documentation for interactive use, this is stated:
When the secondary or selected variables aren’t set, the normal variables are used, except for $fish_pager_color_selected_background, where the background of $fish_color_search_match is tried first.
This is still technically true, but because of the new initialization behavior for fish_pager_color_selected_background, this doesn't happen in practice, so the documentation is now misleading. To get the documented behavior, I can of course just run:
set -e fish_pager_color_selected_background
But the default behavior is still confusing.
Context
I'm a maintainer of the Dracula theme for fish, and in this theme, we rely on the documented behavior for fish_pager_color_selected_background (falling back to the background color of fish_color_search_match). Upon upgrading to fish version 3.4, I was confused as to why the background color of selected autocompletions had changed. Users of this theme are probably having a similar experience.
Suggested Solutions
-
Change the initialized value of fish_color_search_match to -r and remove the initialization of fish_pager_color_selected_background.
This would change the background color of search matches to be the same as selected autocompletions and rely on the documented fallback behavior for fish_pager_color_selected_background.
-
Add a note to the documentation that fish_pager_color_selected_background is set as a universal variable by default and needs to be unset in order to have the documented fallback behavior.
This seems like it might be exposing the "guts" of fish's initialization process too much for what is supposed to be user-friendly documentation.
-
Don't change initialization code or documentation at all, but instead inform 3rd-party theme maintainers (like myself) that fish_pager_color_selected_background now needs to be explicitly set instead of relying on the fallback behavior.
This issue might suffice, but a page/blurb on this repository's wiki would probably be better.
Issue
With the recent release of
fishversion3.4, thefish_pager_color_selected_backgroundvariable is now set as a universal variable along with the other pager colors upon interactive initialization:fish-shell/share/functions/__fish_config_interactive.fish
Lines 62 to 67 in cd62771
It think this is a perfectly reasonable default, but in the documentation for interactive use, this is stated:
This is still technically true, but because of the new initialization behavior for
fish_pager_color_selected_background, this doesn't happen in practice, so the documentation is now misleading. To get the documented behavior, I can of course just run:But the default behavior is still confusing.
Context
I'm a maintainer of the Dracula theme for
fish, and in this theme, we rely on the documented behavior forfish_pager_color_selected_background(falling back to the background color offish_color_search_match). Upon upgrading tofishversion3.4, I was confused as to why the background color of selected autocompletions had changed. Users of this theme are probably having a similar experience.Suggested Solutions
Change the initialized value of
fish_color_search_matchto-rand remove the initialization offish_pager_color_selected_background.This would change the background color of search matches to be the same as selected autocompletions and rely on the documented fallback behavior for
fish_pager_color_selected_background.Add a note to the documentation that
fish_pager_color_selected_backgroundis set as a universal variable by default and needs to be unset in order to have the documented fallback behavior.This seems like it might be exposing the "guts" of
fish's initialization process too much for what is supposed to be user-friendly documentation.Don't change initialization code or documentation at all, but instead inform 3rd-party theme maintainers (like myself) that
fish_pager_color_selected_backgroundnow needs to be explicitly set instead of relying on the fallback behavior.This issue might suffice, but a page/blurb on this repository's wiki would probably be better.