builtin set_color: stop resetting unrelated attributes on --background=normal

"set_color --background=normal" resets all attributes.  I don't expect anyone
relied on this behavior. Let's remove it, to reduce surprise.  This also
improves consistency with "set_color --underline-color=normal".

As suggested in
https://github.com/fish-shell/fish-shell/issues/11417#issuecomment-2825023522

For backwards compatibility reasons, "set_color normal" still resets
everything though.  In future we could make "set_color --foreground=normal"
reset only foreground.

Closes #11418
This commit is contained in:
Johannes Altmanninger
2025-04-23 20:01:38 +02:00
parent e10573088a
commit 7bdb561d24
4 changed files with 17 additions and 16 deletions

View File

@@ -165,13 +165,17 @@ Optional Commands
-
- Select background color from 24-bit RGB colors.
-
* - ``\e[49m``
-
- Reset background color to the terminal's default.
-
* - ``\e[58:2:: Ps : Ps : Ps m`` (note: colons not semicolons)
- Su
- Select underline color from 24-bit RGB colors.
- kitty
* - ``\e[59m``
- Su
- Reset underline color (follow foreground color).
- Reset underline color to the default (follow the foreground color).
- kitty
* - ``\e[ Ps S``
- indn