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

Unknown Arguments trigger displays garbled user input #78

Closed
d1str0 opened this issue Sep 23, 2019 · 5 comments
Closed

Unknown Arguments trigger displays garbled user input #78

d1str0 opened this issue Sep 23, 2019 · 5 comments

Comments

@d1str0
Copy link

d1str0 commented Sep 23, 2019

Sorry for a possibly confusing title...

If I set a group and subsequent command similar to,

let test = Group {
        
        $0.command("get",
                   Option("user", default: "", description: "The user to get."),
                   description: "Get User Information")

But I call the program as so:
$ test get -user myuser

Notice how "-user" should have an extra "-", this causes the "Unknown Arguments" error to print out:

Unknown Arguments: -usre myuser

Options:
    --user [default: ] - The user to get.

Notice "-usre" is garbled. Upon further runs, this word seems to rotate through it's order of letters. Very strange.

@kylef kylef closed this as completed in f2ac63b Sep 23, 2019
@kylef
Copy link
Owner

kylef commented Sep 23, 2019

@d1str0 Thanks for reporting, the flags have previously been stored in an unordered way so that upon printing a flag set "u", "s", "e", "r" can be in unpredicatable order.

I've altered the implementation so that flag sets are stored in ordered way fixing this bug.

@d1str0
Copy link
Author

d1str0 commented Sep 23, 2019

Thanks for such a quick turnaround!

@d1str0
Copy link
Author

d1str0 commented Sep 23, 2019

@kylef will you be releasing a new version or should I try and just pull this latest code?

@kylef
Copy link
Owner

kylef commented Sep 23, 2019

I've released this as 0.9.1

@d1str0
Copy link
Author

d1str0 commented Sep 23, 2019

Thanks much. Consider adding a donation link to the project. I may be able to swing some cash your way from my employer. No guarantees but I could probably get them to contribute an amount.

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

No branches or pull requests

2 participants