Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions mod.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Deno users should use mod.ts instead
export * from './deno/index.ts'
11 changes: 11 additions & 0 deletions src/Command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,17 @@ class Command {
body: ` $ ${name} ${this.usageText || this.rawName}`,
})

// Show full description for specific commands (not global/default)
if (!this.isGlobalCommand && !this.isDefaultCommand && this.description) {
sections.push({
title: 'Description',
body: this.description
.split('\n')
.map((line) => ` ${line}`)
.join('\n'),
})
}
Comment on lines +152 to +161
Copy link

Copilot AI Jan 23, 2026

Choose a reason for hiding this comment

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

New behavior adds a dedicated "Description" section for subcommand help, but there are no tests asserting this output. Since help output is user-facing and already has coverage (e.g., examples/help.js in src/test/index.test.ts), please add a test (snapshot or string assertions) that verifies some-command --help includes the Description section and preserves multi-line descriptions.

Copilot uses AI. Check for mistakes.

const showCommands =
(this.isGlobalCommand || this.isDefaultCommand) && commands.length > 0

Expand Down