`regexp` feature uses the pcre2 library to enable the user to define
regular expressions for matching text and applying text formatting to
the matches. An example from the theme configuration I used to test
this:
[terminal.themes.win95.text_format_regexps]
"listing.subject" = { "\\[[^\\]]*\\]" = { attrs = "Bold" } }
"listing.from" = { "\\<[^\\>]*\\>(?:(?:\\s*$)|(?=,))" = { attrs = "Italics" } }
[terminal.themes.win95.text_format_regexps."pager.envelope.body"]
"^>.*$" = { attrs = "Italics" }
"\\d+\\s?(?:(?:[KkMmTtGg]?[Bb])|(?:[KkMmTtGg][Bb]?)(?=\\s))" = { attrs = "Bold | Underline" }
FormatTag describes a set of attributes, colors that exist in a
tag_table field of CellBuffer. The field of tag_associations contains
the hash of a tag and the {start,end} index of the cells that have this
attribute. A tag can thus be used many times.
An example of use is
let t = self.pager.insert_tag(FormatTag {
attrs: Attr::ITALICS,
..Default::default()
});
debug!("FormatTag hash = {}", t);
let (width, height) = self.pager.size();
for i in 0..height {
if self.pager.content[(0, i)].ch() == '>' {
self.pager.set_tag(t, (0, i), (width.saturating_sub(1), i));
}
}
This will set reply lines in text as italics.
This feature interface is not used anywhere yet.
Add aliases to avoid repetition of raw values when defining new themes.
Aliases are strings starting with "$" and must be defined in the
`color_aliases` and `attr_aliases` fields of a theme.
Theme attribute values can refer to another theme key instead of
defining a value. Add support for optionally defining the theme key's
field by appending a ".fg" or ".bg" suffix to the link's key.
Add grammar for execute commands and parser to identify possible next
tokens for the user's execute command input.
The grammar is given as a sequence of Tokens in each command's
definition. The parser parses the user's input according to this
grammar, and returns the tokens that could come next, if any.
Add attribute escape sequence support in terminal::ansi, which handles
converting strings with ansi escape sequences into meli's internal
terminal structures in order to incorporate them into the UI.
If directory is invalid (i.e. has no {cur,new,tmp} subfolders), accept
it ONLY if it contains subdirs of any depth that are valid maildir
paths.
For example, this change will accept the following directory tree:
```
invalid_maildir
└── valid_maildir
├── cur
├── new
└── tmp
```
Execute user provided command invocations $CMD such as `editor_cmd` with
`/bin/sh` as `/bin/sh -c "$CMD"
Previously, user commands were split by whitespace which must trigger
erroneous behavior if quotes are involved.
Makefile displays a warning if $MANDIR is not in your manpaths or
$BINDIR is not in your $PATH. Expand paths $PREFIX (and by association $BINDIR and $MANDIR) before doing that validation or otherwise paths like '~/.local' and '/home/user/.local' will be erroneously reported different