Skip to content

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

Closed
pgkelley4 wants to merge 1 commit into
pallets:masterfrom
pgkelley4:master
Closed

Fix #628: Bash completion for nested commands broken#639
pgkelley4 wants to merge 1 commit into
pallets:masterfrom
pgkelley4:master

Conversation

@pgkelley4
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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 was marked as off-topic.

This comment was marked as off-topic.

@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

Development

Successfully merging this pull request may close these issues.

2 participants