set_color.rst: remove redundant documentation

Also clarify that only a foreground "normal" resets everything (at least
with https://github.com/fish-shell/fish-shell/pull/11418)
This commit is contained in:
Johannes Altmanninger
2025-04-24 09:31:28 +02:00
parent 2f9d5ac7d6
commit 05508fa551

View File

@@ -61,12 +61,10 @@ The following options are available:
**-h** or **--help**
Displays help about using this command.
Using the **normal** keyword will reset foreground, background, and all formatting back to default.
Notes
-----
1. Using the **normal** keyword will reset both background and foreground colors to whatever is the default for the terminal.
1. Using **set_color normal** will reset all colors and modes to the terminal's default.
2. Setting the background color only affects subsequently written characters. Fish provides no way to set the background color for the entire terminal window. Configuring the window background color (and other attributes such as its opacity) has to be done using whatever mechanisms the terminal provides. Look for a config option.
3. Some terminals use the ``--bold`` escape sequence to switch to a brighter color set rather than increasing the weight of text.
4. ``set_color`` works by printing sequences of characters to standard output. If used in command substitution or a pipe, these characters will also be captured. This may or may not be desirable. Checking the exit status of ``isatty stdout`` before using ``set_color`` can be useful to decide not to colorize output in a script.