mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-29 05:21:00 +01:00
24957: better sanity checking of colour ranges
always use termcap for numeric ranges where available
This commit is contained in:
parent
85810b7b8e
commit
0ef4ecefc7
3 changed files with 41 additions and 12 deletions
|
|
@ -2180,18 +2180,16 @@ or the name of one of the eight most widely-supported colours.
|
|||
|
||||
Not all terminals support this and, of those that do, not all provide
|
||||
facilities to test the support, hence the user should decide based on the
|
||||
terminal type. Most terminals with colour support accept the numbers 0 to
|
||||
7, and may generate additional colours if the tt(bold) attributes is also
|
||||
present. Most terminals also have a standard range of colours for those
|
||||
numbers (though the interpretation of the colour can vary); these colours
|
||||
can be set by one of the names tt(black), tt(red), tt(green), tt(yellow),
|
||||
tt(blue), tt(magenta), tt(cyan) and tt(white). Abbreviations are
|
||||
allowed; tt(b) or tt(bl) selects black.
|
||||
terminal type. Most terminals support the colours tt(black), tt(red),
|
||||
tt(green), tt(yellow), tt(blue), tt(magenta), tt(cyan) and tt(white),
|
||||
which can be set by name. Abbreviations are allowed; tt(b) or tt(bl)
|
||||
selects black. Some terminals may generate additional colours if the
|
||||
tt(bold) attribute is also present.
|
||||
|
||||
On recent terminals and on systems with an up-to-date terminal database the
|
||||
number of colours supported may be tested by with the command `tt(echotc
|
||||
Co)'; if this succeeds, it indicates a limit on the number of colours which
|
||||
will be enforced by the line editor. The number of colours is in case
|
||||
will be enforced by the line editor. The number of colours is in any case
|
||||
limited to 256 (i.e. the range 0 to 255).
|
||||
|
||||
Colour is also known as color.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue