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
If user config file overwrites a single attribute and not the others,
for example only bg:
"mail.listing.tag_default" = { bg = "Blue" }
The other attributes, in this case fg and attrs revert to the default
values of ThemeAttributeInner and not the default value for the key
"mail.listing.tag_default". As a result the above expands to:
"mail.listing.tag_default" = { fg = Color::Default, bg = "Blue", attrs
= Attr::Default }
This commit keeps the key value defaults, so the above should expand to:
"mail.listing.tag_default" = { fg = default_theme["mail.listing.tag_default"].fg, bg = "Blue", attrs
= default_theme["mail.listing.tag_default"].attrs }
Attribute links are not checked for validity in theme validation, and an
invalid link would cause a panic in is_cyclic.
This commit improves the theme validation errors by printing if the
error lies in a theme key or a link.
Text attributes have been rewritten as bit flags, so for example instead of
"BoldUnderline" you'd have to define "Bold | Underline" in your theme
settings.
Requested in #21