-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
doc/bug: repl.start() prompt doesn't default to '> ' #5385
Comments
ChALkeR
added
doc
Issues and PRs related to the documentations.
repl
Issues and PRs related to the REPL subsystem.
labels
Feb 23, 2016
PR coming. |
I think example in docs should be updated, the options parameter isn't optional. |
See #5388 |
cjihrig
added a commit
to cjihrig/node
that referenced
this issue
Feb 25, 2016
Currently, there is a check to ensure that the user either provides an object or a string to repl.start(). The string case is used to set a REPL prompt. However, a default of '> ' already exists, so forcing the user to specify a prompt is a bit redundant. This commit removes this restriction. Fixes: nodejs#5385 PR-URL: nodejs#5388 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
Fishrock123
pushed a commit
that referenced
this issue
Mar 8, 2016
Currently, there is a check to ensure that the user either provides an object or a string to repl.start(). The string case is used to set a REPL prompt. However, a default of '> ' already exists, so forcing the user to specify a prompt is a bit redundant. This commit removes this restriction. Fixes: #5385 PR-URL: #5388 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
Fishrock123
pushed a commit
that referenced
this issue
Mar 8, 2016
Currently, there is a check to ensure that the user either provides an object or a string to repl.start(). The string case is used to set a REPL prompt. However, a default of '> ' already exists, so forcing the user to specify a prompt is a bit redundant. This commit removes this restriction. Fixes: #5385 PR-URL: #5388 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By: Julian Duque <julianduquej@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following the contents of
./doc/api/repl.markdown
, lines 217-227, I put this inrepl_test.js
:Running that, I get
On line 252 of
./doc/api/repl.markdown
, it is noted that prompt should default to>
if an options object is passed in, but not what should happen if it is called without arguments.I took a look at
./lib/readline.js
and./lib/repl.js
and the culprit for the code snippet failing (if the docs represent the intended functionality) is line 197-198 of./lib/repl.js
.Either way, it seems to me that either the docs should be updated to reflect the code, or those lines in
./lib/repl.js
should be removed to make it fall back to an empty object and thus the default>
prompt. No PR submitted because I don't know which of the directions to go in.The text was updated successfully, but these errors were encountered: