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 suggestions for positional arguments should be in index order #112

Closed
kbknapp opened this issue May 8, 2015 · 1 comment
Closed
Assignees
Labels
C-bug Category: Updating dependencies
Milestone

Comments

@kbknapp
Copy link
Member

kbknapp commented May 8, 2015

The order is displayed correctly everywhere except "suggested usage" (i.e. when a typo is made and the usage string is re-generated for current usage). In this string it appears in alphabetical order which can be confusing.

@kbknapp kbknapp added the C-bug Category: Updating dependencies label May 8, 2015
@kbknapp kbknapp self-assigned this May 8, 2015
@kbknapp kbknapp added this to the 1.0 Release milestone May 8, 2015
@kbknapp
Copy link
Member Author

kbknapp commented May 8, 2015

This line Should probably return a BTreeMap<u8, &str> where positional arguments are first in, with index as keys, and everything else is just a key_counter += 1. Or just use a FIFO queue of some type.

... Thinking out loud.

Eventually (read soon), I'd like to re-look at the use of data structures throughout clap and see if there are more efficient choices, (i.e. using perhaps using a more standard Map and just sorting only when needed)?

@kbknapp kbknapp closed this as completed in eb0e374 May 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Updating dependencies
Projects
None yet
Development

No branches or pull requests

1 participant