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

Fix #628: Bash completion for nested commands broken #639

Closed
wants to merge 1 commit into from

Conversation

@pgkelley4
Copy link
Contributor

@pgkelley4 pgkelley4 commented Aug 19, 2016

When concatenating protected_args and args, protected_args
should be prepended. Otherwise the arguments are out
of order and an incorrect subcommand is choosen.

@pgkelley4
Copy link
Contributor Author

@pgkelley4 pgkelley4 commented Aug 19, 2016

This is the same fix as xificurC did here: #630, but with added unit tests to demonstrate the issue.

When concatenating protected_args and args, protected_args
should be prepended. Otherwise the arguments are out
of order and an incorrect subcommand is choosen.
pass

assert list(get_choices(cli, 'lol', [], '-')) == ['--local-opt']
assert list(get_choices(cli, 'lol', [], '')) == []

This comment has been minimized.

This comment has been minimized.

@untitaker untitaker self-assigned this Aug 19, 2016
@pgkelley4 pgkelley4 changed the title Fix #630: Bash completion for nested commands broken Fix #628: Bash completion for nested commands broken Aug 19, 2016
@untitaker untitaker closed this in 891a223 Aug 19, 2016
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants