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

Strip escapes when TERM=dumb #205

Closed
fgunbin opened this issue Mar 31, 2021 · 2 comments · May be fixed by gnodet/jansi#1
Closed

Strip escapes when TERM=dumb #205

fgunbin opened this issue Mar 31, 2021 · 2 comments · May be fixed by gnodet/jansi#1
Milestone

Comments

@fgunbin
Copy link

fgunbin commented Mar 31, 2021

I've got this use case: in emacs, I do M-x compile RET mvn clean install RET (Maven 3.6.3; macOS Terminal), and escapes are output (and not understood as colors).

Besides jansi system properties like jansi.mode=strip, there is also a workaround on the emacs side: C-u M-x compile .., which enables "comint" mode in compilation buffer, in which there's a filter function available, "ansi-color-process-output", which can filter or fontify escape sequences.

Emacs uses a tty for interactions with a subprocess (falling back to pipes only if tty is not available), so isatty check inside jansi won't help.

Also Emacs sets env var of this form: "INSIDE_EMACS=28.0.50,compile", but this is too emacs-specific.

Based on all this, it looks to me that jansi should check for TERM=dumb, and force "strip" mode in that case.

@fgunbin
Copy link
Author

fgunbin commented May 25, 2021

Ping?

@gnodet gnodet closed this as completed in 09722b7 Jul 23, 2021
@gnodet gnodet added this to the 2.3.4 milestone Jul 23, 2021
@fgunbin
Copy link
Author

fgunbin commented Jul 23, 2021

@gnodet Thank you!

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

Successfully merging a pull request may close this issue.

2 participants