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

Allow positional arguments with dashes inside #4939

Merged
merged 2 commits into from
Mar 1, 2016

Conversation

MCGallaspy
Copy link
Contributor

Summary

Fixes #4935:

Allow positional arguments with dashes inside

It choked on valid commands like:
`kalite manage retrievecontentpack local es-ES foo.zip`
Because of the dash in the middle of a positional argument.
So only match if there is preceding whitespace.

Also remove redundant non-capturing group -- negative lookaheads
don't capture anyway.

Remove reference to nonexistent CHANGELOG.rst in our PR template, too.

TODO

If not all TODOs are marked, this PR is considered WIP (work in progress)

  • Has documentation been written/updated? [[See the warning message, comments]]

It choked on valid commands like:
`kalite manage retrievecontentpack local es-ES foo.zip`
Because of the dash in the middle of a positional argument.
So only match if there is preceding whitespace.

Also remove redundant non-capturing group -- negative lookaheads
don't capture anyway.
@MCGallaspy MCGallaspy added the bug label Feb 29, 2016
@MCGallaspy MCGallaspy added this to the 0.16.0 milestone Feb 29, 2016
@MCGallaspy MCGallaspy changed the title 4935 arg parse bug Allow positional arguments with dashes inside Mar 1, 2016
@aronasorman
Copy link
Collaborator

Can confirm that this command now works as expected:

kalite manage retrievecontentpack local pt-BR ~/src/github.com/fle-internal/content-pack-maker/out/pt-BR.zip

@aronasorman
Copy link
Collaborator

Will wait 'til the test is fixed, or otherwise merged by someone else.

rtibbles added a commit that referenced this pull request Mar 1, 2016
Allow positional arguments with dashes inside
@rtibbles rtibbles merged commit 1d79c20 into learningequality:0.16.x Mar 1, 2016
@rtibbles rtibbles removed the has PR label Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants