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

Fix bracketing for non-required positionals in usage #175

Merged
merged 1 commit into from
Feb 10, 2022

Conversation

alexflint
Copy link
Owner

@alexflint alexflint commented Feb 9, 2022

In the usage string we now put square brackets around non-required positional arguments, and nest them all together like this:

Usage: myprog REQUIRED1 REQUIRED2
Usage: myprog REQUIRED1 REQUIRED2 [OPTIONAL1 [OPTIONAL2]]
Usage: myprog REQUIRED1 REQUIRED2 REPEATED [REPEATED ...]
Usage: myprog REQUIRED1 REQUIRED2 [REPEATEDOPTIONAL [REPEATEDOPTIONAL ...]]
Usage: myprog REQUIRED1 REQUIRED2 [OPTIONAL1 [REPEATEDOPTIONAL [REPEATEDOPTIONAL ...]]]

Fixes #174

@codecov-commenter
Copy link

Codecov Report

Merging #175 (5fb236a) into master (d370610) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #175   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            5         5           
  Lines          682       683    +1     
=========================================
+ Hits           682       683    +1     
Impacted Files Coverage Δ
usage.go 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d370610...5fb236a. Read the comment docs.

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.

optional positional arguments should be displayed as such in the Usage string
2 participants