Skip to content
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

Avoid printing trailing whitespace in help output #5074

Open
2 tasks done
djc opened this issue Aug 16, 2023 · 1 comment
Open
2 tasks done

Avoid printing trailing whitespace in help output #5074

djc opened this issue Aug 16, 2023 · 1 comment
Labels
C-enhancement Category: Raise on the bar on expectations

Comments

@djc
Copy link

djc commented Aug 16, 2023

Please complete the following tasks

Clap Version

4.3.21

Describe your use case

In the rustup project, we use the trycmd crate to make sure we don't regress help output. However, while upgrading clap from 3 to 4, I noticed that clap 4 seems to output trailing spaces in some cases:

Screenshot 2023-08-16 at 15 46 14 Screenshot 2023-08-16 at 15 46 30

Personally, I have configured VS Code to files.trimTrailingWhitespace which I believe is helpful in most cases. As such, it has proven to be challenging to fix up the trycmd snapshots.

Describe the solution you'd like

Ideally I think clap should not output trailing whitespace.

Alternatives, if applicable

Do nothing, I guess -- I suppose this is a niche concern.

Additional Context

No response

@djc djc added the C-enhancement Category: Raise on the bar on expectations label Aug 16, 2023
@epage
Copy link
Member

epage commented Aug 16, 2023

So far I've not been too particular about trailing whitespace so long as it doesn't get styled because it can add a bit of bookkeeping (affecting binary size) for something most people won't see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: Raise on the bar on expectations
Projects
None yet
Development

No branches or pull requests

2 participants