-
Notifications
You must be signed in to change notification settings - Fork 4
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
Is there anyway to clear screen? #5
Comments
Try with ANSI escape code https://en.wikipedia.org/wiki/ANSI_escape_code#CSI_(Control_Sequence_Introducer)_sequences |
Thank you! Here's my code: process.stdout.write("\r\x1b[1J", () => {
process.stdout.write("\r\x1b[3J", () => {
console.log("")
})
}) As you can see, after using that to clear screen, I have to use console.log to make serverline's prompt works correctly. Is there any way more graceful to fix this issue? |
Did you try : |
This seems won't work, prompt will miss util I input an Enter |
Your code is not working because its a ansi escape character. Its going back one character not clearing screen. I suggest putting the |
Just like unix clear command.
The text was updated successfully, but these errors were encountered: