MichalGniadek / klask

Automatically create GUI applications from clap3 apps
MIT License
376 stars 23 forks source link

Console output area does not support all console color codes #45

Open barafael opened 2 years ago

barafael commented 2 years ago

I was trying klask with this project: https://github.com/mazznoer/gradient-rs (I thought maybe it would make for a good showcase for this klask).

And the main window looks great as expected:

image

I have checked the list-presets option there. The output looks quite funny though:

image

In my terminal, it looks like this:

image

I'm not sure this is even in scope for klask, so just FYI :)

barafael commented 2 years ago

For reference, this is the output file generated by running gradient-rs --list-presets: presets.txt

MichalGniadek commented 2 years ago

Interesting... I will have to check if it breaks during cansi text categorization, or during egui display, or maybe even something else.

EDIT: I checked, and it does break on cansi. Interestingly, gradient-rs uses handwritten ansi sequences and not some other more popular crate. I wonder if they are using some more exotic sequences and that's why it breaks. Ansi seems to be a big pile of edge cases and non-standard behavior.