Printing Color Output #650
-
I haven't dug too far down into this but I was curious how one would print colored output. I've attempted escape codes but not luck. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 4 replies
-
Ah yeah good question! Hex escape codes currently aren't being managed so if you try to use an ANSI colour sequence, \xb1 for example, will be the literal string "\xb1" rather than the hex char https://github.com/dictu-lang/Dictu/blob/develop/src/vm/compiler.c#L1020-L1058 |
Beta Was this translation helpful? Give feedback.
-
This is great. Thank you. Do we want to support more escape codes? |
Beta Was this translation helpful? Give feedback.
-
Thanks for all of the info. I'll defer to you on how you'd like to proceed. Happy to help with implements. |
Beta Was this translation helpful? Give feedback.
-
ICYMI: https://github.com/briandowns/colorize dictum install github.com/briandowns/colorize |
Beta Was this translation helpful? Give feedback.
It's a bit nasty and super rough but take a look at the feature/parse_hex branch, that should allow you to use ansi codes for terminal colours