-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Support conceal
ANSI escape on Windows
#439
Comments
Then selecting it with the mouse would reveal it, right? |
Yes, but I don't think that matters. On OS X, you can select and copy to get the value anyways, or disable colors in a colorizer like chalk. So it's definitely not intended for sensitive stuff. I would use it to hide noisy info while still being there if you copy/redirect the output. |
I see. Then adjusting the color to match the one in the background would indeed work. |
Common misconception with conceal is that it has the effect that, say, typing a password into an SSH login prompt does. It doesn't. Terminals that emulate the conceal code this way are doing it incorrectly. I'm speculating, but since the conceal escape seems to be historical, I would imagine copy/paste wasn't an issue on terminals that didn't have mice. The cursor position still advances, iirc. @sindresorhus is correct in suggesting to set it to However, I'd go so far as to include |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
The
conceal
ANSI escape is used to visually hide the output while it still being there.This is important for consistency between Unix-based systems and Windows in CLI tools.
Info
https://en.wikipedia.org/wiki/ANSI_escape_code
Unfortunately, this one isn't supported by any Windows API afaik.
I was thinking that it might be possible to emulate it setting the text color to the default background color of the console.
Test case
OS X
Node.js 0.12.5, OS X 10.10, Terminal.app
Windows
Node.js 0.12.5, Windows 8.1, cmd.exe
The text was updated successfully, but these errors were encountered: