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
Escape sequences are printed when using custom output stream #651
Comments
When you use custom streams I think you should create your terminal as
|
Thanks for the help, setting
Is there any way to disable this echoing? |
Ok, dumb terminal is rather primitive to be used in interactive session. You might want to create a real terminal, see an example in ShellFactoryImpl.java#L119-L223. |
I tried to create terminal with same attributes/flags as the one that is created by cmd/powershell but the escape sequence characters are still printed. It looks like the different settings are applied depending of the os terminal from which application is started. E.g. starting application from cmd/powershell/2-click sets terminal type to |
If terminal type is not set when building terminal then When you build terminal using custom streams and you do not have environment variable
When using git-bash/unix try to build your terminal as
|
The "ansi" type solved all the problems, thanks a lot for help.
FYI the |
Hi,
I am upgrading to jline3 from jline2. I solved most of the issues but I cannot get rid of few cursor control escape sequences:
[?1h=
and[?1l>[?1000l
.Those sequences are printed when application is started on linux, macOS or git-bash in windows. Starting application from windows cmd or power shell will not print those escape sequences. The issue occures when custom output stream is used, the System.out works perfectly fine.
In the descibed case I needed to remove
>....
but setting terminal size explicitly solved that. Also I am already using option (BRACKETED_PASTE, false).On git-bash the terminal type is
xterm
and uses ExternalTerminal. For unix, type isxterm-256color
and uses PosixPtyTerminal.I checked other threads but neither solution worked, maybe I missed something.
Is there any other way to remove those escape sequences?
The text was updated successfully, but these errors were encountered: