ansi-escapes icon indicating copy to clipboard operation
ansi-escapes copied to clipboard

Add ConEmu-specific escape codes

Open DRSDavidSoft opened this issue 6 years ago • 2 comments

ConEmu

I'd like to add some of the ConEmu-specific escape codes via a PR if it's okay with you.

documentation:
https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC

For example, the equivalent to this iTerm 2 sequence: https://github.com/sindresorhus/ansi-escapes/blob/5f93ecafddfc02f562d41d776c96938fc27ce333/index.js#L129

Would be this for ConEmu:

x.ConEmu.setCwd = (cwd = process.cwd()) => `${OSC}9;9;${cwd}${BEL}`; 

per the documentation:

Sequence Description
ESC ] 9 ; 9 ; “cwd” ST Inform ConEmu about shell current working directory.

DRSDavidSoft avatar Feb 16 '19 22:02 DRSDavidSoft

Sure, PR welcome :)

sindresorhus avatar Feb 18 '19 05:02 sindresorhus

We could then also add a general setCwd method which uses iTerm.setCwd on iTerm and ConEmu.setCwd on ConEmu.

sindresorhus avatar Feb 18 '19 06:02 sindresorhus