Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Set title mode escape codes not matched #21

Closed
cancerberoSgx opened this issue Apr 18, 2018 · 0 comments
Closed

Set title mode escape codes not matched #21

cancerberoSgx opened this issue Apr 18, 2018 · 0 comments

Comments

@cancerberoSgx
Copy link
Contributor

cancerberoSgx commented Apr 18, 2018

Hello,

according to links below, the following sequence instruct the terminal to set window title and icon:

\u001b]0;sg@tota:~/git/\u0007

and strip-ansi is not removing it

In other words I expect

stripAnsi('\u001b]0;sg@tota:~/git/\u0007\u001b[01;32m[sg@tota\u001b[01;37m misc-tests\u001b[01;32m]$') 

to return the string:

[sg@tota misc-tests]$

This is very common in xterm based linux stdout to print the prompt. Thanks BTW this is great project! keep it up!

References:
http://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h2-Title-Modes
https://unix.stackexchange.com/questions/288996/what-u001b0kubajcubic-u0007-escape-code-do

failing test PR https://github.com/chalk/ansi-regex/pull/22/files

@sindresorhus sindresorhus changed the title set title mode escape codes not matched Set title mode escape codes not matched Apr 21, 2018
sindresorhus pushed a commit that referenced this issue Apr 21, 2018
sindresorhus pushed a commit that referenced this issue Mar 8, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants