-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inlined colors #150
Comments
I don't think this a bad idea. The approach I'd like to do is having a module with macros mapping to use colored::inline;
// This could also be `colored::println!`, as an example for other options.
inline::println!("Command {c.b}{name}{c.d} {c.r}not found{c.d}"); By making it a macro it could still check at compile time that everything is correctly implemented, and since the stdlib formatting macros don't support What do you think? |
I like
Regarding the main syntax, the Is it flexible enough to have
in some first initialization call to the macro (or a global var or something? procedural macros should have access to this?)?
like |
Would it be possible to support a more dense inline style of coloring similar to this python function
print_color("Command {c.b}{name}{c.d} {c.r}not found{c.d}")
where
c.b
would be blue andc.d
would reset to default, ideally with customizable styles so you could havec.bb
for blue bold instead of having to do{}, name.blue().bold();
The text was updated successfully, but these errors were encountered: