Expand description
mutt’s enter-command (:): config commands typed at runtime.
Parsing is shared with the muttrc importer (same tokenizer, same
option and color vocabulary), so what --import-muttrc understands
in a file is also what : understands at the prompt. Applying is
split: everything that is pure Config state lands in apply,
while binds, macros, aliases, and key pushing belong to the running
TUI and are returned to the caller untouched. A later folder-hook
with arbitrary commands parses the same way and applies the same
Config half.
Enums§
- Command
- One command off the
:prompt. A single line can yield several (set a=1 b=2is two assignments, like mutt). - Menu
- Which key table a
bind/macrotargets.Genericis mutt’s catch-all menu, applied to both of rmut’s tables.
Functions§
- apply
- Apply the
Confighalf of a command.Ok(Some(text))is a message for the status line (a query’s answer);Ok(None)is a silent success, mutt-style. Commands the TUI owns (bind, macro, alias, push, exec) returnOk(None)without touching the config, so the caller must handle those itself. - parse
- Parse one
:line. An empty line or a comment yields nothing; an unknown or malformed command is an error string ready for the status line.