diff --git a/.ci/print-command-docs.js b/.ci/print-command-docs.js index 3acda9b..f5328e1 100755 --- a/.ci/print-command-docs.js +++ b/.ci/print-command-docs.js @@ -110,10 +110,11 @@ async function getCommandHelp(fnmPath, command) { const headerIndex = rows.findIndex((x) => x.includes("SUBCOMMANDS")); /** @type {string[]} */ const subcommands = []; - for (const row of rows.slice(headerIndex + 1)) { - const matched = row.match(/^\s{4}(\w+)/); - if (!matched) break; - subcommands.push(matched[1]); + if (!command) { + for (const row of rows.slice(headerIndex + 1)) { + const words = row.split(/\s+/); + subcommands.push(words[1]); + } } return { subcommands, diff --git a/.gitignore b/.gitignore index edd775a..3ed51ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +node_modules/ docs/screen_recording /benchmarks/results /target diff --git a/docs/commands.md b/docs/commands.md index 402c1e4..cb54259 100644 --- a/docs/commands.md +++ b/docs/commands.md @@ -309,14 +309,14 @@ OPTIONS: ``` -# `fnm list` +# `fnm list-remote` ``` -fnm-list 1.25.0 -List all locally installed Node.js versions +fnm-list-remote 1.25.0 +List all remote Node.js versions USAGE: - fnm list [OPTIONS] + fnm list-remote [OPTIONS] FLAGS: -h, --help Prints help information