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

doc: sorting in doc/api/cli? #19814

Closed
vsemozhetbyt opened this issue Apr 4, 2018 · 9 comments
Closed

doc: sorting in doc/api/cli? #19814

vsemozhetbyt opened this issue Apr 4, 2018 · 9 comments
Labels
cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations. question Issues that look for answers.

Comments

@vsemozhetbyt
Copy link
Contributor

Currently, both command line options and environment variables in the cli doc are not sorted alphabetically.

I am not sure if these lists use some logic or time order that has to be preserved.

Is it worth to sort them ASCII-wise?

@vsemozhetbyt vsemozhetbyt added question Issues that look for answers. doc Issues and PRs related to the documentations. cli Issues and PRs related to the Node.js command line interface. labels Apr 4, 2018
@Trott
Copy link
Member

Trott commented Apr 5, 2018

+1 to alphabetical sorting. It's the most obvious thing to do, so let's not give people something to figure out if we don't have to.

@willhayslett
Copy link
Contributor

@vsemozhetbyt are you executing on this? Can help if needed.

@richardlau
Copy link
Member

I think the command line options are listed in the order they appear in node --help.

@Trott
Copy link
Member

Trott commented Apr 6, 2018

I think the command line options are listed in the order they appear in node --help.

Those should probably be alphabetized as well. :-D (FWIW, python --help and ls --help show alphabetized listings on my machine.)

@vsemozhetbyt
Copy link
Contributor Author

@willhayslett If we have some consensus for this here with no objections in some days, please, feel free to make a PR.

@willhayslett
Copy link
Contributor

@vsemozhetbyt, doc specific PR submitted.

Should we also alphabetize the node --help output as well?

@vsemozhetbyt
Copy link
Contributor Author

I think if the PR is adopted we definitely will need to sort this as well.

@Trott
Copy link
Member

Trott commented Apr 8, 2018

Should we also alphabetize the node --help output as well?

Yes, I think ideally the ordering will be kept the same for both. So if we change one, we should change the other at the same time.

willhayslett added a commit to willhayslett/node that referenced this issue Apr 13, 2018
Alphabetizing the command line options and environment
variables in doc/api/cli.md for consistency and readability.

Refs: nodejs#19814
willhayslett added a commit to willhayslett/node that referenced this issue Apr 13, 2018
Updated the node.PrintHelp() function to return command line options
and environment variables sorted in ascii order. Additionally,
added missing options as sourced from doc/api/cli.md. Options
added include "--", "--help" and the "NODE_PRESERVE_SYMLINKS"
environment variable.

Also updated the comments in the PrintHelp() method to C++ style.

Fixes: nodejs#19814
willhayslett added a commit to willhayslett/node that referenced this issue Apr 13, 2018
Ascii sorted the node man page command line options.
This change brings sort order consistency between the
cli options displayed in doc/node.1 and the cli options
enumerated in other areas of the project.

Also rearranged the language for "--use-bundled-ca, --use-openssl-ca"
to correspond with the order of the options as displayed.

Fixes: nodejs#19814
vsemozhetbyt pushed a commit that referenced this issue Apr 13, 2018
* Alphabetize the command line options and environment
  variables in doc/api/cli.md for consistency and readability.

* Update doc/api/cli.md to include command line options
  being printed in the `node.PrintHelp()` function in src/node.cc
  but weren't otherwise documented in the cli spec. Options added
  include:

  --napi-modules
  --v8-pool-size=num
  --experimental-modules
  --experimental-vm-modules

* ASCII sort the node man page command line options.
  This change brings sort order consistency between the
  cli options displayed in doc/node.1 and the cli options
  enumerated in other areas of the project.

  Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca`
  to correspond with the order of the options as displayed.

* Update `node.PrintHelp()` function to return command line options
  and environment variables sorted in ASCII order. Additionally,
  add missing options as sourced from doc/api/cli.md. Options
  added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS`
  environment variable.

  Also update the comments in the `node.PrintHelp()` method
  to C++ style.

* Create tests to validate that the newly ASCII sorted
  cli options in the `node.PrintHelp()` function are being
  returned according to build configurations as expected.

PR-URL: #19878
Refs: #19814
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
@vsemozhetbyt
Copy link
Contributor Author

Fixed in a43e889. Thank you all!

jasnell pushed a commit that referenced this issue Apr 16, 2018
* Alphabetize the command line options and environment
  variables in doc/api/cli.md for consistency and readability.

* Update doc/api/cli.md to include command line options
  being printed in the `node.PrintHelp()` function in src/node.cc
  but weren't otherwise documented in the cli spec. Options added
  include:

  --napi-modules
  --v8-pool-size=num
  --experimental-modules
  --experimental-vm-modules

* ASCII sort the node man page command line options.
  This change brings sort order consistency between the
  cli options displayed in doc/node.1 and the cli options
  enumerated in other areas of the project.

  Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca`
  to correspond with the order of the options as displayed.

* Update `node.PrintHelp()` function to return command line options
  and environment variables sorted in ASCII order. Additionally,
  add missing options as sourced from doc/api/cli.md. Options
  added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS`
  environment variable.

  Also update the comments in the `node.PrintHelp()` method
  to C++ style.

* Create tests to validate that the newly ASCII sorted
  cli options in the `node.PrintHelp()` function are being
  returned according to build configurations as expected.

PR-URL: #19878
Refs: #19814
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
BridgeAR pushed a commit to BridgeAR/node that referenced this issue May 1, 2018
* Alphabetize the command line options and environment
  variables in doc/api/cli.md for consistency and readability.

* Update doc/api/cli.md to include command line options
  being printed in the `node.PrintHelp()` function in src/node.cc
  but weren't otherwise documented in the cli spec. Options added
  include:

  --napi-modules
  --v8-pool-size=num
  --experimental-modules
  --experimental-vm-modules

* ASCII sort the node man page command line options.
  This change brings sort order consistency between the
  cli options displayed in doc/node.1 and the cli options
  enumerated in other areas of the project.

  Also rearrange the language for `--use-bundled-ca`, `--use-openssl-ca`
  to correspond with the order of the options as displayed.

* Update `node.PrintHelp()` function to return command line options
  and environment variables sorted in ASCII order. Additionally,
  add missing options as sourced from doc/api/cli.md. Options
  added include `--`, `--help` and the `NODE_PRESERVE_SYMLINKS`
  environment variable.

  Also update the comments in the `node.PrintHelp()` method
  to C++ style.

* Create tests to validate that the newly ASCII sorted
  cli options in the `node.PrintHelp()` function are being
  returned according to build configurations as expected.

PR-URL: nodejs#19878
Refs: nodejs#19814
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com>
Reviewed-By: Khaidi Chu <i@2333.moe>
Reviewed-By: James M Snell <jasnell@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Issues and PRs related to the Node.js command line interface. doc Issues and PRs related to the documentations. question Issues that look for answers.
Projects
None yet
Development

No branches or pull requests

4 participants