Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

silverwind
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

src, doc

Description of change
  • added missing environment variables
  • 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

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Dec 6, 2016
@silverwind silverwind added the doc Issues and PRs related to the documentations. label Dec 6, 2016
@Fishrock123 Fishrock123 self-assigned this Dec 6, 2016
@silverwind silverwind added the semver-minor PRs that contain new features and should be released in the next minor version. label Dec 6, 2016
@silverwind
Copy link
Contributor Author

Marking this as semver-minor as it documents a feature added in fd644f5.

@@ -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
Copy link
Contributor

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.

Copy link
Contributor Author

@silverwind silverwind Dec 6, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you suggesting not highlighting the value at all? This is how the current release renders for me:

While it seems more common that man pages don't add arguments in the title, it doesn't seem wrong to me to have them highlighted like this:

Copy link
Contributor

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.

Copy link
Contributor Author

@silverwind silverwind Dec 16, 2016

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"
Copy link
Contributor

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.

Copy link
Contributor Author

@silverwind silverwind Dec 16, 2016

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.

@Fishrock123
Copy link
Contributor

@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.
Copy link
Member

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.)

@silverwind
Copy link
Contributor Author

silverwind commented Dec 17, 2016

Fixed nit and highlighted some more values in the man page. Regarding NODE_TTY_UNSAFE_ASYNC in --help, I feel that it should be there for completeness sake. Any other opinions on that one?

@Fishrock123
Copy link
Contributor

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.

@silverwind
Copy link
Contributor Author

Remove. I hope we deprecate it soon then.

@silverwind
Copy link
Contributor Author

@Fishrock123 LGTY?

@Fishrock123
Copy link
Contributor

@silverwind Seems good to me

@silverwind
Copy link
Contributor Author

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
@silverwind
Copy link
Contributor Author

Fixed merge conflicts and added --trace-events-enabled and --trace-event-categories to the man page.

@silverwind
Copy link
Contributor Author

Going to land this later today unless there are objections. The descriptions for the two new flags were copied as-is from the docs.

@silverwind
Copy link
Contributor Author

Thanks! Landed in 2d23562.

@silverwind silverwind closed this Dec 22, 2016
@silverwind silverwind deleted the env-vars-man branch December 22, 2016 23:27
silverwind added a commit that referenced this pull request Dec 22, 2016
- 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
@evanlucas
Copy link
Contributor

@silverwind this isn't landing cleanly on v7.x. Mind backporting to v7.x-staging?

@silverwind
Copy link
Contributor Author

@evanlucas it will land clean if you apply ba4847e first, is that good enough?

git cherry-pick ba4847e879424ad173289e8fb96cc86a09ee899b
git cherry-pick 2d23562588eebaf9a2a3d3987fe6e4ef63ab9500

@evanlucas
Copy link
Contributor

@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.

silverwind added a commit to silverwind/node that referenced this pull request Jan 10, 2017
- 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
silverwind added a commit that referenced this pull request Jan 16, 2017
- 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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
Reviewed-By: Jeremiah Senkpiel <[email protected]>
@italoacasas italoacasas mentioned this pull request Jan 31, 2017
@sam-github sam-github removed the semver-minor PRs that contain new features and should be released in the next minor version. label May 15, 2017
@MylesBorins
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants