Browse Source

Fix missing list-remote in command doc (#461)

remotes/origin/add-with-shims
BinHong Lee 4 years ago committed by GitHub
parent
commit
4eda8d3990
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      .ci/print-command-docs.js
  2. 1
      .gitignore
  3. 8
      docs/commands.md

7
.ci/print-command-docs.js

@ -110,10 +110,11 @@ async function getCommandHelp(fnmPath, command) {
const headerIndex = rows.findIndex((x) => x.includes("SUBCOMMANDS")); const headerIndex = rows.findIndex((x) => x.includes("SUBCOMMANDS"));
/** @type {string[]} */ /** @type {string[]} */
const subcommands = []; const subcommands = [];
if (!command) {
for (const row of rows.slice(headerIndex + 1)) { for (const row of rows.slice(headerIndex + 1)) {
const matched = row.match(/^\s{4}(\w+)/); const words = row.split(/\s+/);
if (!matched) break; subcommands.push(words[1]);
subcommands.push(matched[1]); }
} }
return { return {
subcommands, subcommands,

1
.gitignore vendored

@ -1,3 +1,4 @@
node_modules/
docs/screen_recording docs/screen_recording
/benchmarks/results /benchmarks/results
/target /target

8
docs/commands.md

@ -309,14 +309,14 @@ OPTIONS:
``` ```
# `fnm list` # `fnm list-remote`
``` ```
fnm-list 1.25.0 fnm-list-remote 1.25.0
List all locally installed Node.js versions List all remote Node.js versions
USAGE: USAGE:
fnm list [OPTIONS] fnm list-remote [OPTIONS]
FLAGS: FLAGS:
-h, --help Prints help information -h, --help Prints help information

Loading…
Cancel
Save