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

Clarify CLI syntax for multi-value arguments #290

Merged

Conversation

Bluewind
Copy link
Contributor

@Bluewind Bluewind commented Sep 3, 2019

GLI will not strip comma characters from the end of arguments. If a user
is following the help syntax for a multi-value argument, the first to
N-1 values parsed will be incorrect (have an unstripped comma at the
end of the value). Solve this by printing the argument name only once,
followed by '...' directly. This is similar to the behaviour of git.

Signed-off-by: Florian Pritz [email protected]

@davetron5000
Copy link
Owner

This is a good change, but the tests are failing since they expect the original syntax. if you can get them passing I can merge/release.

@Bluewind Bluewind force-pushed the multiple-argname-clarification branch from 6d207c6 to ed10c0d Compare September 3, 2019 14:21
GLI will not strip comma characters from the end of arguments. If a user
is following the help syntax for a multi-value argument, the first to
N-1 values parsed will be incorrect (have an unstripped comma at the
end of the value). Solve this by printing the argument name only once,
followed by '...' directly. This is similar to the behaviour of git.

Signed-off-by: Florian Pritz <[email protected]>
@Bluewind Bluewind force-pushed the multiple-argname-clarification branch from ed10c0d to ce529e9 Compare September 3, 2019 14:25
@Bluewind
Copy link
Contributor Author

Bluewind commented Sep 3, 2019

I've fixed the tests now.

@davetron5000 davetron5000 merged commit 4a7ad07 into davetron5000:gli-2 Sep 3, 2019
@davetron5000
Copy link
Owner

Released as 2.19.0 Thanks!

@Bluewind Bluewind deleted the multiple-argname-clarification branch September 3, 2019 16:23
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.

2 participants