Skip to content

Display default values in CLI help text#130

Draft
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-issue-in-cli-command
Draft

Display default values in CLI help text#130
Copilot wants to merge 5 commits into
mainfrom
copilot/fix-issue-in-cli-command

Conversation

Copilot AI commented Feb 15, 2026

Copy link
Copy Markdown

CLI help text was missing default values for flags, forcing users to read source code or documentation to understand default behavior.

Changes

Modified packages/jsdoc-cli/lib/help.js to append default values to flag descriptions:

if (flagDetail.defaultDescription) {
  description += ` Default: ${flagDetail.defaultDescription}`;
} else if (flagDetail.default !== undefined) {
  const defaultValue =
    typeof flagDetail.default === 'object' && flagDetail.default !== null
      ? JSON.stringify(flagDetail.default)
      : String(flagDetail.default);
  description += ` Default: ${defaultValue}`;
}

Impact

Help text now displays:

  • --access: Default: All except 'private'
  • --destination: Default: ./out
  • --encoding: Default: utf8

Handles edge cases: falsy values (0, false, ""), null, and complex objects via JSON serialization.

Original prompt

Reference: oracle/oci-cli@b770913


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits February 15, 2026 09:08
Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com>
Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com>
Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com>
Co-authored-by: Goo78 <163220761+Goo78@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue in OCI CLI command execution Display default values in CLI help text Feb 15, 2026
Copilot AI requested a review from Goo78 February 15, 2026 09:13
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.

2 participants