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

clearTerminal not working on Windows 10 w/ GitBash #21

Closed
stramel opened this issue May 19, 2020 · 2 comments
Closed

clearTerminal not working on Windows 10 w/ GitBash #21

stramel opened this issue May 19, 2020 · 2 comments
Labels

Comments

@stramel
Copy link

stramel commented May 19, 2020

Snowpack is using this package to clear the terminal and it is causing my Windows 10 Git Bash terminal to spam output.

Here is the gist of the output: https://gist.github.com/stramel/66bed75cb5900c3a87ba1f5e6e942e74

Here is the usage: https://github.com/pikapkg/snowpack/blob/2e010bb862d3d8349b6254cbfc9f8d9d98bb0c6a/src/commands/paint.ts#L53

Also, related discussion on snowpack's discussion board: https://www.pika.dev/npm/snowpack/discuss/191

@Qix- Qix- added the question label May 19, 2020
@Qix-
Copy link
Contributor

Qix- commented May 19, 2020

Not much we can do about this, really. Unles the emulator that comes with Git Bash has a special character to clear the terminal, there's nothing we can really do on our end to fix this.

Keep in mind that TTY escape codes are very archaic and haven't seen much progress since the 90's (maybe earlier). This is kind of an unfortunate side effect of that.

One thing to make sure of is that you're scrolled all the way down to the very bottom of the terminal (not just the output, but make sure the scroll bar, if any, hits the very bottom of the "track"). A common side effect of applications that "clear" or "update" the terminal + scrolling upward = repeated or sporadic output, such as what you're describing.

Sorry I couldn't give you a better answer. I'm going to go ahead and close this as there's nothing actionable unless it's found Git Bash has proprietary escape codes and gives us a means of doing terminal detection.

If this is really, really bothering you and you would like to see a fix, you can open a ticket with Git Bash directly.

@Qix- Qix- closed this as completed May 19, 2020
@stramel
Copy link
Author

stramel commented Jun 1, 2020

@Qix- This what CRA used to clear the screen for Git Bash on Windows. Testing locally, it seems to generate significantly better output.

facebook/create-react-app#2071
jestjs/jest#5251

Not sure if there would be interest in doing something similar for this lib?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants