-
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
src/doc: improve man page and --help #10157
Conversation
Marking this as |
@@ -182,26 +182,34 @@ Specify ICU data load path. (overrides \fBNODE_ICU_DATA\fR) | |||
\',\'\-separated list of core modules that should print debug information. | |||
|
|||
.TP | |||
.BR NODE_PATH =\fIpath\fR[:\fI...\fR] | |||
\':\'\-separated list of directories prefixed to the module search path. | |||
.BR NODE_DISABLE_COLORS =\fI1\fR |
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.
There's not really an authority on this but I think this isn't correct in the way we've been using it.
That is, we italicize what kind of thing we pass to it, not what it actually is. Since that is inconsistent with things that can take multiple values, I left it as just all bold since that is the only way it could ever work anyways.
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.
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 guess to me the difference is that for NODE_DISABLE_COLORS
the "value" is what it actually must be, and for the others it describes what the value should be set to.
I'm not hugely against changing it, but I feel it is no less confusing, perhaps either way.
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 see what you mean. I still think it'be more consistent to still highlight the 1
, maybe in the description below as well.
#endif | ||
"NODE_REPL_HISTORY path to the persistent REPL history file\n" | ||
"NODE_TTY_UNSAFE_ASYNC set to 1 to enable async stdout and stderr\n" |
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.
Leave this out of the --help
please. It requires a warning which is far too long and bother some for --help
and besides, this option isn't even helpful.
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 feel it has it's place here, even if discouraged. The UNSAFE
should make it clear enough that it has a caveat and users can look up details in the man page or in the online docs.
@silverwind Could you take a look again? |
.BR NODE_PATH =\fIpath\fR[:\fI...\fR] | ||
\':\'\-separated list of directories prefixed to the module search path. | ||
.BR NODE_DISABLE_COLORS =\fI1\fR | ||
When set to 1 colors will not be used in the REPL. |
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.
Nit: While you're in here editing the file anyway, can you add a comma after 1
? (Makes it clear that the variable should be set to 1
and not 1 colors
or something like that.)
9c83ece
to
6ce934f
Compare
Fixed nit and highlighted some more values in the man page. Regarding |
I'll make a PR later to remove that env variable, I added it solely at the request of others backwards compat concerns and firmly believe it should not even exist. I have not seen any help requests where people need it either. |
Remove. I hope we deprecate it soon then. |
@Fishrock123 LGTY? |
@silverwind Seems good to me |
Looks like ba4847e introduced two more switches that were only added to the command line help, not to the man page. We should really review those better. |
- add missing environment variables to --help - add missing flags to man page - sort environment variables alphabetically - add some highlighting to the man page - remove stops from descriptions in --help for consistency - few other minor tweaks to --help
182e0ce
to
01a75a4
Compare
Fixed merge conflicts and added |
Going to land this later today unless there are objections. The descriptions for the two new flags were copied as-is from the docs. |
Thanks! Landed in 2d23562. |
- add missing environment variables to --help - add missing flags to man page - sort environment variables alphabetically - add some highlighting to the man page - remove stops from descriptions in --help for consistency - few other minor tweaks to --help PR-URL: #10157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
@silverwind this isn't landing cleanly on v7.x. Mind backporting to v7.x-staging? |
@evanlucas it will land clean if you apply ba4847e first, is that good enough? git cherry-pick ba4847e879424ad173289e8fb96cc86a09ee899b
git cherry-pick 2d23562588eebaf9a2a3d3987fe6e4ef63ab9500 |
@silverwind unfortunately, I'm pretty sure that commit relies on some changes in v8 that are not in v7.x, so that commit would have to be backported as well. |
- add missing environment variables to --help - add missing flags to man page - sort environment variables alphabetically - add some highlighting to the man page - remove stops from descriptions in --help for consistency - few other minor tweaks to --help PR-URL: nodejs#10157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
- add missing environment variables to --help - add missing flags to man page - sort environment variables alphabetically - add some highlighting to the man page - remove stops from descriptions in --help for consistency - few other minor tweaks to --help PR-URL: #10157 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Italo A. Casas <me@italoacasas.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
we've opted to not land this on v6.x for now. It can likely land as a patch as the semver minor documentation has already landed on v6.x Please feel free to backport |
Checklist
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passesAffected core subsystem(s)
src, doc
Description of change