Skip to content

Set title mode escape codes not matched #21

Closed
@cancerberoSgx

Description

@cancerberoSgx

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions