mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 00:31:15 -03:00
Given that this curly underline will also be red, it should be widely
understood as error.
Since fish always renders immediately (and synchronously), typing "echo"
will briefly show an intermediate curly line. Maybe fish should redraw
after a timer elapses? This is probably unrelated to this patch.
As mentioned in cc9849c279 (Curly underlines in set_color and fish_color_*,
2025-04-13), there are still some terminals that interpret "\e[4:3m" as
something other than curly underline.
Some of them interpret it as background/foreground color, and some terminal
multiplexers downgrade it to straight underlines (which often happens due
to a false positive). I want to change this in multiplexers where possible
(see https://github.com/orgs/tmux/discussions/4477) but for now, disable
this feature in multiplexers (there are just a handful).
In a few years, those terminals will maybe agree with XTerm. Until then,
use XTGETTCAP as a temporary stepping stone. We could also read the terminfo
database but that will give only very few true positives, and lots of false
negatives. Better implement XTGETTCAP in the relevant terminals.
Note that if the universal variables use the "--track" flag (from the
grandparent commit), then
rm -rf /tmp/newhome
foot -e env $HOME=/tmp/newhome fish
xterm -e env $HOME=/tmp/newhome fish
will "magically work". For foot, $fish_color_error will have --underline=curly.
For xterm, it will not, due to the call to "fish_config theme update".
But of course since it's a universal variable, running fish in xterm
would also downgrade the fish running in other terminals.
Add a "fish_config theme save --yes" flag because "status xtgettcap"
requires stdin to be a terminal. I'd probably drop this requirement, and
make "status xtgettcap" always use fish's stdin and not its own. That'd be
cheating because an external command can't do that but I don't think this
change would be hurting anyone.
35 lines
1.0 KiB
Plaintext
35 lines
1.0 KiB
Plaintext
# name: fish default
|
|
# NOTE: These should only use named colors
|
|
# to give us the maximum chance they are
|
|
# visible in whatever terminal setup.
|
|
|
|
fish_color_normal normal
|
|
fish_color_autosuggestion brblack
|
|
fish_color_cancel -r
|
|
fish_color_command normal
|
|
fish_color_comment red
|
|
fish_color_cwd green
|
|
fish_color_cwd_root red
|
|
fish_color_end green
|
|
fish_color_error brred --underline=curly
|
|
fish_color_escape brcyan
|
|
fish_color_history_current --bold
|
|
fish_color_host normal
|
|
fish_color_host_remote yellow
|
|
fish_color_keyword normal
|
|
fish_color_operator brcyan
|
|
fish_color_option cyan
|
|
fish_color_param cyan
|
|
fish_color_quote yellow
|
|
fish_color_redirection cyan --bold
|
|
fish_color_search_match white --background=brblack --bold
|
|
fish_color_selection white --background=brblack --bold
|
|
fish_color_status red
|
|
fish_color_user brgreen
|
|
fish_color_valid_path --underline
|
|
fish_pager_color_completion normal
|
|
fish_pager_color_description yellow -i
|
|
fish_pager_color_prefix normal --bold --underline
|
|
fish_pager_color_progress brwhite --background=cyan --bold
|
|
fish_pager_color_selected_background -r
|