Skip to content

Fix leading space in option helptext #2348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 25, 2025
Merged

Conversation

mmkal
Copy link
Contributor

@mmkal mmkal commented Mar 24, 2025

Problem

There's a leading space when an option has no description but does have a default value (or other "extra info"):

image

Solution

Copy the existing logic for arguments to avoid a leading space:

image

Added a test which failed before the change to lib/help.js

image

ChangeLog

Fix leading space in option helptext

Copy link
Collaborator

@shadowspawn shadowspawn left a comment

Choose a reason for hiding this comment

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

LGTM, thanks

@shadowspawn shadowspawn merged commit 672e380 into tj:develop Mar 25, 2025
11 checks passed
@shadowspawn shadowspawn added the pending release Merged into a branch for a future release, but not released yet label Apr 11, 2025
@shadowspawn
Copy link
Collaborator

This has been released in Commander v14.

@shadowspawn shadowspawn removed the pending release Merged into a branch for a future release, but not released yet label May 18, 2025
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.

3 participants