You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create JLine in dumb mode by passing TERM=dumb environment variables.
Launch the process from some java installed at some location idea in its path.
E.g. your system user could be named "Eideard".
Expected result
It's expected that there are no colors in dumb mode
Actual result
Colors are printed in dump mode
This logic is located in org.jline.terminal.TerminalBuilder#doBuild:
I don't have the full background for the change, it was originally introduced in this commit with description "experiment" which isn't very descriptive.
Such implicit behavior seems quite unexpected.
If someone wants to enable colors even in dumb mode there should be some explicit argument for that.
If somewhere in IDEA the colors are indeed needed with dumb JLine, then the argument could be passed explicitly.
The text was updated successfully, but these errors were encountered:
The idea is that jline can autodetect when run inside IDEA, which does support ansi colours. Do you have a problem because the detection was wrong, or because you're running inside IDEA but do not want the colour support to be detected, or because the detection indicates it's running in IDEA but colours are not really supported in your use case ?
It's a heuristic, so it can be refined at will.
JLine implicitly enabled colors even when we explicitly put it in dump mode. No warnings, no logs, etc...
It was very hard to debug the issue because in Dev/Debug IDEA I couldn't reproduce the issue due to this magic logic command.contains("idea");
Do you have a problem because the detection was wrong,
It was wrong for Dev IDEA where the command line doesn't contain "idea".
It contains "java.exe" with the last program argument "com.intellij.idea.Main"
or because you're running inside IDEA but do not want the colour support to be detected
This as well, because we used TERM=dumb but colors still were shown in non-dev IDEA.
Note that I fixed the original issue in IntelliJ IDEA Scala Plugin.
But such implicit logic complicates the process of understanding the system.
It's not mentioned anywhere in the docs (at least I couldn't find it).
The more such magic we have in various tools the harder our life will be (and when we speak of IDEA there are dozens if not hundreds of tools involved)
To me, this commit "experiment" was a quick patch which shouldn't have been to end up in the final version.
It would be more clear if IntelliJ IDEA explicitly passed the colors flag.
(I don't have isolated reproduction steps, please let me know if you need them.
Originally the issue was found to be a root cause of https://youtrack.jetbrains.com/issue/SCL-20177)
Create JLine in dumb mode by passing
TERM=dumb
environment variables.Launch the process from some java installed at some location
idea
in its path.E.g. your system user could be named "Eideard".
Expected result
It's expected that there are no colors in dumb mode
Actual result
Colors are printed in dump mode
This logic is located in
org.jline.terminal.TerminalBuilder#doBuild
:I don't have the full background for the change, it was originally introduced in this commit with description "experiment" which isn't very descriptive.
Such implicit behavior seems quite unexpected.
If someone wants to enable colors even in dumb mode there should be some explicit argument for that.
If somewhere in IDEA the colors are indeed needed with dumb JLine, then the argument could be passed explicitly.
The text was updated successfully, but these errors were encountered: