-
Notifications
You must be signed in to change notification settings - Fork 76
Description
Currently, we are exposing our Rich-like mini-language. It hasn't been public until message.* options were added, so the question arises: should we keep it, or replace it with a color object? The message expressions already have {} formatting support, so we could use {color.red}{color.bold} instead of [red bold].
Benefits of the mini-language: mimics Rich, can possibly merge several options into one escape sequence (though I don't think we do that now, and pretty minor), and might be able to be smart about resetting (though we could post-process the string and apply resets in the other form).
Benefits of the formatting object: only requires .format pass, doesn't need us to process [], [] no longer has special meaning, [new-color] won't change meaning if we add "new-color" later. I'm also not sure if we handle escapes yet, but we wouldn't have to worry about it with a formatting object.