-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Add cls command to repl #52206
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
Add cls command to repl #52206
Conversation
2e75463 to
afe8eea
Compare
|
I understand the proposal for a new command, but given the existing |
In most CLI and REPL having a command to clear the screen. People who is more using commands instead of shortcuts will a little hard to clear the screen while using Node.js REPL. |
afe8eea to
1d743e5
Compare
BridgeAR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I looked at this twice at least and I have no strong opinion about adding the additional command.
Maybe it's useful, while it's also not required. I did not see requests for it before, so it's probably not often needed while people might also think about it more with the additional command existing.
Should we just accept this? I guess it won't hurt? @nodejs/repl
BridgeAR
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I guess it's fine to add it.
|
@MrJithil could you please rebase? |
|
Sure. |
repl: add cls command `.cls` will clear the current repl screen
1d743e5 to
43e1003
Compare
|
@BridgeAR Rebased. Thanks. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #52206 +/- ##
==========================================
- Coverage 88.49% 88.45% -0.04%
==========================================
Files 703 703
Lines 207529 207545 +16
Branches 40011 40008 -3
==========================================
- Hits 183643 183587 -56
- Misses 15885 15944 +59
- Partials 8001 8014 +13
🚀 New features to boost your workflow:
|
jasnell
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm generally -1 on this. console.clear() works perfectly well for this.
There are commands. But, console.clear is not a shortcut command. People extensively use the console will know the pain of typing the |
|
People who extensively use the console should know about Ctrl/Cmd + L |
|
since more feedback not to land this feature, closing the PR. We will start. further discussions in the future if needed. |

add
.clscommand which will be very convinient for clearing the active screen