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

Handle explicit empty placeholders #243

Merged
merged 2 commits into from
Apr 2, 2024
Merged

Conversation

alexflint
Copy link
Owner

@alexflint alexflint commented Mar 31, 2024

When the user explicitly sets the placeholder to empty, we change the usage text so that there aren't extraneous spaces:

var args struct {
    Something `arg:"-s" placeholder:"" help:"some help for something"`
}
...
Options:
  -s, --something    some help for something
...

Previous this would have printed usage text with some extraneous spaces: -s , --something

Closes #241

@codecov-commenter
Copy link

codecov-commenter commented Mar 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.17%. Comparing base (5ec29ce) to head (be792f1).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #243      +/-   ##
==========================================
- Coverage   99.19%   99.17%   -0.02%     
==========================================
  Files           5        5              
  Lines         745      731      -14     
==========================================
- Hits          739      725      -14     
  Misses          3        3              
  Partials        3        3              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexflint alexflint merged commit dfca71d into master Apr 2, 2024
4 of 5 checks passed
@alexflint alexflint deleted the handle-empty-placeholder branch April 2, 2024 16:16
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.

Disable placeholder
2 participants