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

usage: Put positional args direclty in usage string #518

Closed
kamalmarhubi opened this issue Jun 1, 2016 · 4 comments
Closed

usage: Put positional args direclty in usage string #518

kamalmarhubi opened this issue Jun 1, 2016 · 4 comments
Labels
C-enhancement Category: Raise on the bar on expectations E-medium Call for participation: Experience needed to fix: Medium / intermediate
Milestone

Comments

@kamalmarhubi
Copy link

kamalmarhubi commented Jun 1, 2016

If I have just one optional positional arg say FILE, it should show up directly in the usage string, instead of as [ARGS]. If it's required it shows up as <FILE>, but if it's optional I get [ARGS] with it listed under the ARGS section in help. I'd prefer [FILE] directly in usage.

@kbknapp
Copy link
Member

kbknapp commented Jun 1, 2016

I hadn't thought about that before, I like that. My only concern would be handling conflicts, or if users get confused why adding more positional args makes them disappear from the default usage string.

Thoughts?

@kbknapp kbknapp added C-enhancement Category: Raise on the bar on expectations P4: nice to have E-medium Call for participation: Experience needed to fix: Medium / intermediate labels Jun 1, 2016
@kamalmarhubi
Copy link
Author

My only concern would be handling conflicts

As in different args with the same value_name?

if users get confused why adding more positional args makes them disappear from the default usage string.

Perhaps it could be an app or arg setting then?

@kbknapp
Copy link
Member

kbknapp commented Jun 2, 2016

As in different args with the same value_name?

No, I mean if the positional arg conflicts with specific options or flags. But on the flip side, the user would a message with new usage string so I guess it's not that big a deal.

Perhaps it could be an app or arg setting then?

I thought about that, but I think its benign enough to be the default and add a setting to disable this feature.

@kbknapp
Copy link
Member

kbknapp commented Jun 4, 2016

#520 fixes this

@homu homu closed this as completed in ec86f2d Jun 8, 2016
@kbknapp kbknapp added this to the 2.6.0 milestone Jun 8, 2016
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 E-medium Call for participation: Experience needed to fix: Medium / intermediate
Projects
None yet
Development

No branches or pull requests

3 participants