docs: improve Node REPL dot commands explanation#71
Conversation
- Group `.clear` and `.break` together as equivalent in default REPL - Simplify descriptions of dot commands - Clarify that `.clear` only resets context in custom programmatic REPL Signed-off-by: Mohamed Mohsen <zmohamedmohsnz@gmail.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit 4c02066. Bugbot is set up for automated code reviews on this repo. Configure here. |
👋 Codeowner Review RequestThe following codeowners have been identified for the changed files: Team reviewers: @nodejs/repl Please review the changes when you have a chance. Thank you! 🙏 |
Co-authored-by: Aviv Keller <me@aviv.sh> Signed-off-by: Mohamed Mohsen <zmohamedmohsnz@gmail.com>
|
Hi, I’ve applied all the suggested changes and updated the branch. |
|
Is there any new news? |
| - `.break` / `.clear`: exits multi-line code like functions. Same as pressing CTRL-C. | ||
| - `.load`: loads a JavaScript file, relative to the current working directory. | ||
| - `.save`: saves all commands you entered in the session to a file. | ||
| - |
| `.clear` clear the whole REPL context like restarting the session only in a custom REPL created programmatically: | ||
|
|
||
| ```console | ||
| require('repl').start(); | ||
| ``` | ||
|
|
There was a problem hiding this comment.
I tested .clear in the terminal REPL, but it doesn't actually reset the REPL context, variables are stayed there. I tested it also now in a code file, the same thing so I believe I should remove this note.
There was a problem hiding this comment.
I have updated the code recently. Can you check it?
Signed-off-by: Mohamed Mohsen <zmohamedmohsnz@gmail.com>
.clearand.breaktogether as equivalent in default REPL.clearonly resets context in custom programmatic REPL