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

Adds a failing test for short flags of subcommand not being recognized bug #17

Merged

Conversation

lalloni
Copy link
Contributor

@lalloni lalloni commented Nov 17, 2014

When setting up a short flag of a nested subcommand, the flag is recognized (when parsing a command line) if used in its long form but not recognized in its short form.

This PR contains only the failing test.

@lalloni
Copy link
Contributor Author

lalloni commented Nov 17, 2014

I've been chasing this bug all the weekend, and finally gave up, accepting my golang "newbieness", and humbly sending this PR with the failing test.

@lalloni
Copy link
Contributor Author

lalloni commented Nov 17, 2014

@alecthomas if you give me some hint on what could be causing this I can keep trying to solve it.

@alecthomas
Copy link
Owner

Interesting, thanks for chasing this up. I'll take a look!

@alecthomas alecthomas self-assigned this Nov 20, 2014
alecthomas added a commit that referenced this pull request Nov 21, 2014
@alecthomas alecthomas merged commit de11bc4 into alecthomas:master Nov 21, 2014
@alecthomas
Copy link
Owner

Okay, try it now. After adding many many println's, it dawned on me that perhaps I just wasn't recursively initialising subcommands. Thanks for finding the bug and sending the PR.

@lalloni
Copy link
Contributor Author

lalloni commented Nov 27, 2014

@alecthomas your fix worked as expected. thank you.

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