Skip to content

Version In Help#33

Merged
boneskull merged 2 commits intomainfrom
version-in-help
Feb 3, 2026
Merged

Version In Help#33
boneskull merged 2 commits intomainfrom
version-in-help

Conversation

@boneskull
Copy link
Owner

Also fixes --version to always exit (with code 0) even when version
detection fails, preventing confusing parse errors.

Note: Testing --version/--help behavior is intentionally excluded from
coverage as these paths call process.exit().

@boneskull
Copy link
Owner Author

boneskull commented Feb 3, 2026

Stack


Managed by gh-stack

@boneskull boneskull requested a review from Copilot February 3, 2026 02:58
@boneskull boneskull added the bug Something isn't working label Feb 3, 2026
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds the --version flag to the help output and ensures it always exits with code 0, even when version detection fails. The changes prevent confusing parse errors by making --version consistently terminate the program.

Changes:

  • Modified --version handling to always call process.exit(0), even when version detection fails
  • Added --version to the help text options schema with description "Show version number"
  • Updated comment to reflect that built-in options (not just completion-script) are being added

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@boneskull boneskull mentioned this pull request Feb 3, 2026
Base automatically changed from shell-completion-22 to main February 3, 2026 03:10
Also fixes --version to always exit (with code 0) even when version
detection fails, preventing confusing parse errors.

Note: Testing --version/--help behavior is intentionally excluded from
coverage as these paths call process.exit().
@boneskull boneskull marked this pull request as ready for review February 3, 2026 23:07
Copilot AI review requested due to automatic review settings February 3, 2026 23:07
- Add --help to help output for consistency with --version
- Print 'Version information not available' when version detection fails
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@boneskull boneskull merged commit 96dc9b2 into main Feb 3, 2026
7 checks passed
@boneskull boneskull deleted the version-in-help branch February 3, 2026 23:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant