remove "normal" from the basic color name table

The special token "normal" should not be in the basic sixteen color table
because a) it is not a color, and b) it is special cased with the result of
resetting the terminal colors (usually via a ANSI X3.64 CSI [0m sequence).
This commit is contained in:
Kurtis Rader 2015-11-28 17:50:08 -08:00 committed by ridiculousfish
parent 0a0acc8a2e
commit dfaefb97ff
2 changed files with 3 additions and 4 deletions

View file

@ -7,7 +7,7 @@ set_color [OPTIONS] [COLOR]
\subsection set_color-description Description
`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `brred`, `brgreen`, `brbrown`, `bryellow`, `brblue`, `brmagenta`, `brpurple`, `brcyan`, `white` and `normal`. The `br`, bright, forms are most useful as background colors.
`set_color` changes the foreground and/or background color of the terminal. `COLOR` is one of `black`, `red`, `green`, `brown`, `yellow`, `blue`, `magenta`, `purple`, `cyan`, `brred`, `brgreen`, `brbrown`, `bryellow`, `brblue`, `brmagenta`, `brpurple`, `brcyan`, `white`. The `br`, bright, forms are most useful as background colors. The special color `normal` resets the background and foreground to whatever is normal for your terminal.
If your terminal supports term256 (modern xterms and OS X Terminal and iTerm2), you can specify an RGB value with three or six hex digits, such as A0FF33 or f2f. `fish` will choose the closest supported color. A three digit value is equivalent to specifying each digit twice; e.g., `#2BC` is the same as `#22BBCC`. Hex RGB values can be in lower or uppercase, optionally prefixed with the pound-sign character.
@ -22,7 +22,7 @@ The following options are available:
- `-u`, `--underline` sets underlined mode.
Calling `set_color normal` will set the terminal color to the default color of the terminal.
Calling `set_color normal` will set the terminal background and foreground colors to the defaults for the terminal.
Some terminals use the `--bold` escape sequence to switch to a brighter color set rather than bolding the characters.
@ -30,7 +30,7 @@ Not all terminal emulators support all these features.
`set_color` uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it.
Note that setting either color to "normal" will reset both back- and foreground colors.
Note that setting either color to "normal" will reset both background and foreground colors.
\subsection set_color-example Examples

View file

@ -172,7 +172,6 @@ static const named_color_t named_colors[] =
{L"purple", 5, {0xFF, 0, 0xFF}},
{L"cyan", 6, {0, 0xFF, 0xFF}},
{L"grey", 7, {0xE5, 0xE5, 0xE5}},
{L"normal", 7, {0xE5, 0xE5, 0XE5}},
{L"brgrey", 8, {0x55, 0x55, 0x55}},
{L"brred", 9, {0xFF, 0x55, 0x55}},
{L"brgreen", 10, {0x55, 0xFF, 0x55}},