-
Notifications
You must be signed in to change notification settings - Fork 418
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
Improve ANSI heuristics: add support for ConEmu, ANSICON, NO_COLOR and CLICOLOR #581
Comments
Picocli uses a set of heuristics to determine whether to emit ANSI escape codes or not. These are mostly based on environment variables. Let’s see what we can do to make this work on ConEmu. Can you show a list of all environment variables on this system? I’m especially interested in the ConEmu variables, but other variables may be helpful if you could include them. |
Looking at this list, especially the (See also: |
The following prints out "enabled"
Nothing out of the ordinary or ConEmu related. Only thing I noticed is:
So it seems I have ANSI con installed in the past and later installed ConEmu. Following ConEmu's instructions furter:
|
Thank you for the information.
Thank you for the help! |
Both empty. |
Cool, thanks!
This should add ANSI color support for both ConEmu and AnsiCon, as well as add support for @jhasse ‘s https://bixense.com/clicolors/ proposal. |
I’ll also add support for |
(Note to self: read http://tldp.org/HOWTO/Text-Terminal-HOWTO-16.html ) |
man, what a mess. You'd think there would be a standard for everything terminal related by now. I mean, we've been only doing this since... I don't know, 50 years now. |
…les to improve the ANSI heuristics. Documented the heuristics in the user manual.
I've pushed a commit to master to improve picocli's heuristics for determining whether it should emit ANSI escape codes or not. This should address the issue on your system. Can you verify? I'm still keeping the ticket open because I'm planning to add more unit tests for this. |
Verified, it solves the problem in my situation 👍 Are you planning a release soon? |
Thanks for the confirmation. Yes, planning to do a release within about a week (see 3.9 milestone). |
Hmm, what about the IntelliJ console? With AUTO it's turned off, but with ON it works fine. Is there a way of detecting ANSI support without manually configuring system variables? |
No, not that I know of. The idea would be that all consoles which support colors but don't are a tty, set |
I created this ticket for IntelliJ: https://youtrack.jetbrains.com/issue/IDEA-205699 |
I'm running ConEmu on Windows 10, but Ansi colored mode won't be turned on when using Ansi.AUTO, while Ansi.ON works just fine. How can I remedy this?
The text was updated successfully, but these errors were encountered: