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

document that keyboard interrupt doesn't restore the termcolor on Windows #347

Closed
jmcomets opened this issue Feb 3, 2017 · 3 comments
Closed
Labels
doc An issue with or an improvement to documentation.

Comments

@jmcomets
Copy link
Contributor

jmcomets commented Feb 3, 2017

Hi everyone,

First of all, great job on this. 👍

Now on to my issue: I'm using stable Rust (stable-x86_64-pc-windows-msvc + rustc 1.14.0) and installed ripgrep using cargo install.
When running a basic rg --type cpp <pattern> and pressing Ctrl-C in the middle, cmd's foreground stays red/purple/whatever color was last printed. I haven't tried on Linux to see if this is really platform specific.

@BurntSushi
Copy link
Owner

PR #187 actually added this functionality.

I later removed it to fix #281. My reasoning is here: #281 (comment)

TL;DR - There are significant trade offs for doing ^C handling, and IMO, screwing up the colors in the terminal (which is easy to fix by running echo -ne "\033[0m" or color on Windows I believe) is the least worst choice.

@BurntSushi BurntSushi added the wontfix A feature or bug that is unlikely to be implemented or fixed. label Feb 3, 2017
@jmcomets
Copy link
Contributor Author

jmcomets commented Feb 3, 2017

I 100% understand the decision. Would you be open to adding this issue to a "faq" or "issues" section in the readme?

@BurntSushi BurntSushi reopened this Feb 3, 2017
@BurntSushi
Copy link
Owner

@jmcomets Great idea.

@BurntSushi BurntSushi added doc An issue with or an improvement to documentation. and removed wontfix A feature or bug that is unlikely to be implemented or fixed. labels Feb 3, 2017
@BurntSushi BurntSushi changed the title Keyboard interrupt doesn't restore the termcolor on Windows document that keyboard interrupt doesn't restore the termcolor on Windows Feb 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc An issue with or an improvement to documentation.
Projects
None yet
Development

No branches or pull requests

2 participants