Skip to content
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

Strange coloring issue on Windows Terminal + MSys2 #66

Closed
cbeust opened this issue Mar 13, 2023 · 9 comments
Closed

Strange coloring issue on Windows Terminal + MSys2 #66

cbeust opened this issue Mar 13, 2023 · 9 comments

Comments

@cbeust
Copy link

cbeust commented Mar 13, 2023

The naked command issues the ANSI codes but they are not being processed. However, piping it through cat works:

image

Windows 10, MSys2, Windows Terminal.

@solidiquis
Copy link
Owner

Thank you I'll look into this and have a fix for it soon. Will include in next minor release end of week

@cbeust
Copy link
Author

cbeust commented Mar 13, 2023

Oh, I am dying to hear what the problem is, I'm still trying to puzzle it out, browsing your code and tweaking my environment.

What is causing this?

@solidiquis
Copy link
Owner

I haven't done enough digging to know exactly but I assume the answer is likely found here msys2/MSYS2-packages#1494

@fawni
Copy link
Contributor

fawni commented Mar 18, 2023

this can be solved by enabling virtual terminal for windows

luckily erdtree uses ansi_term which has a convenient function for that:

ansi_term::enable_ansi_support()

(source code)

@solidiquis
Copy link
Owner

Thanks @fawni ! I'll be sure to enable it and include it in tomorrow's release :)

@cbeust
Copy link
Author

cbeust commented Mar 19, 2023

Thanks @solidiquis, look forward to trying it and closing this issue :)

@solidiquis
Copy link
Owner

@cbeust Just published a new release that should have that issue resolved. I'll leave this issue open until someone can confirm for me that the issue is indeed resolved :]

Also I'm not sure what your means of installing erdtree on windows is, but at this time installing from crates.io via $ cargo install erdtree is the most convenient way to get erdtree on windows. Github actions keeps failing to upload the windows binary for some reason and I'll need to investigate that tomorrow after work.

@cbeust
Copy link
Author

cbeust commented Mar 20, 2023

I confirm the issue is fixed! I pulled and rebuilt, and...

image

Thank you!

@solidiquis
Copy link
Owner

Thanks chief!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants