Finish documenting ANSI and therefore all support modules.

This commit is contained in:
Dominik Pantůček 2023-03-20 22:28:33 +01:00
parent cb237f0137
commit 01051b433e

View file

@ -85,6 +85,61 @@ implemented anyway to not require any external dependencies.
### ANSI
A simple module for creating ANSI (ECMA-48) sequence strings.
(ansi . args)
* ```args``` - a list of color/style keywords
Produces an ANSI CSI (Control Sequence Introducer) SGR (Select Graphic
Rendition) strings with given attributes (re)set.
It understands the following keywords:
* ```#:black``` - black text foreground color
* ```#:red``` - red text foreground color
* ```#:green``` - green text foreground color
* ```#:yellow``` - yellow text foreground color
* ```#:blue``` - blue text foreground color
* ```#:magenta``` - magenta text foreground color
* ```#:cyan``` - cyan text foreground color
* ```#:white``` - white (grey) text foreground color
* ```#:default``` - reset all attributes to terminal defaults
* ```#:bold``` - bold font (and/or bright foreground color on some terminals)
The order is important as the ```#:default``` resets all attributes
given even in the same attribute list.
a:error
Used to signal errors. Defaults to red bold text.
a:warning
Used to signal non-fatal warnings. Defaults to regular yellow text.
a:success
Signals success of an operation. Defaults to bold green text.
a:neutral
Used for generic text. Defaults to regular white (grey) text.
a:default
Special style which just resets the terminal output attributes to
terminal defaults.
a:muted
Used for displaying the text "muted" (dimmed). Defaults to bold/bright
black text.
a:highlight
Generic highlight of given text. Defaults to bold blue text.
### Command Line parsing
Generic syntax-based implementation of command-line options parsing