support colons in SGR character attributesmaster
commit5dbcca49263be094fc38159c297458ae323ef647
authorHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 1 May 2024 18:45:39 +0000 (1 20:45 +0200)
committerHiltjo Posthuma <hiltjo@codemadness.org>
Wed, 1 May 2024 18:45:39 +0000 (1 20:45 +0200)
treea96e2e2c91be152faaba7cf54698c8104d799b67
parentd63b9eb90245926b531bd54b1d591adb96613e70
support colons in SGR character attributes

Patch by Mikhail Kot <to@myrrc.dev>
With some modifications to behave more like xterm (see note below).

Example:

printf '\033[48;2;255:0:0mtest\n'

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

Some notes:

"CSI Pm m  Character Attributes (SGR).
[...]
o   xterm allows either colons (standard) or semicolons
(legacy) to separate the subparameters (but after the
first colon, colons must be used).
st.c