Skip to content

nextflow plugins -help: show subcommands#7197

Merged
bentsherman merged 5 commits into
masterfrom
subcommand-help
Jun 8, 2026
Merged

nextflow plugins -help: show subcommands#7197
bentsherman merged 5 commits into
masterfrom
subcommand-help

Conversation

@ewels

@ewels ewels commented Jun 2, 2026

Copy link
Copy Markdown
Member

Show the available subcommands for nextflow plugins in the CLI help.

Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
@netlify

netlify Bot commented Jun 2, 2026

Copy link
Copy Markdown

Deploy Preview for nextflow-docs-staging canceled.

Name Link
🔨 Latest commit 0070523
🔍 Latest deploy log https://app.netlify.com/projects/nextflow-docs-staging/deploys/6a270c6eca5f7f000850d7a2

Comment thread modules/nextflow/src/main/groovy/nextflow/cli/CmdPlugin.groovy
Comment thread modules/nextflow/src/main/groovy/nextflow/cli/CmdPlugin.groovy Outdated
Address review feedback on the plugin usage help:

- The usage() default branch aborted on the <plugin-name>:<command>
  form, so `nextflow plugin nf-hello:greet -help` errored claiming the
  command was unknown. It now falls back to a plugin-specific usage
  block for the colon form (pditommaso).
- For a genuine unknown sub-command, print the failure reason before
  the general usage rather than a bare abort (jorgee).
- Add CmdPluginUsageTest pinning the usage output for each case.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
@ewels

ewels commented Jun 6, 2026

Copy link
Copy Markdown
Member Author

Addressed the review feedback in 81db3ae:

  • usage() no longer aborts on the <plugin-name>:<command> form — it now shows a plugin-specific usage block, so nextflow plugin nf-hello:greet -help works as documented (@pditommaso).
  • For a genuine unknown sub-command, the failure reason is now printed before the general usage instead of a bare abort (@jorgee).
  • Added CmdPluginUsageTest pinning the output for each case.

@pditommaso pditommaso left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. The no-arg usage(); return pattern is consistent with the other UsageAware commands (CmdFs, CmdSecret, CmdAuth, CmdModule), and both earlier review comments are addressed.

@bentsherman bentsherman merged commit 429fd8e into master Jun 8, 2026
23 of 24 checks passed
@bentsherman bentsherman deleted the subcommand-help branch June 8, 2026 19:27
ewels added a commit that referenced this pull request Jun 8, 2026
PR #7197 made CmdPlugin a UsageAware command with its own usage
rendering, which bypassed the -help-json tip that every other command
help screen shows. Restore it, and make CmdPlugin SubcommandAware so its
statically-known sub-commands (install, create) are surfaced in
-help-json - both at the root index and under 'nextflow plugin
-help-json' - matching the human help added in #7197. The dynamic
<plugin-name>:<command> form is resolved at runtime and stays out.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Phil Ewels <phil.ewels@seqera.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants