You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Completion of subcommand options after last argument does not work #919
$ foo subcommand --opt <TAB>
abc def ghi jkl mno pqr stu vwx yz
$ foo subcommand whatever --opt <TAB>
abc def ghi jkl mno pqr stu vwx yz
Actual Behaviour
# WORKS
$ foo subcommand --opt <TAB>
abc def ghi jkl mno pqr stu vwx yz
# BROKEN
$ foo subcommand whatever --opt <TAB>
<list of files in current directory (i.e. fallback when no results)>
I can reproduce the issue. It appear to happen in _bashcomplete.resolve_ctx, which returns a None context in these circumstances, forcing get_choices to return early and empty-handed.
Ok @zx8 try now. I had developed a test case that I thought was representative of your use case but it was not verbatim, now it is. I want to add a few more test cases but I think this fixes the issue.
Activity
zx8 commentedon Jan 26, 2018
Ping @untitaker
atherra commentedon Feb 12, 2018
I can reproduce the issue. It appear to happen in _bashcomplete.resolve_ctx, which returns a None context in these circumstances, forcing get_choices to return early and empty-handed.
@stopthatcow may be interested in this.
stopthatcow commentedon Feb 12, 2018
I will take a look this evening.
stopthatcow commentedon Feb 13, 2018
Hi @zx8 Please try out my CL and be sure it fixes your issue. #931
zx8 commentedon Feb 15, 2018
@stopthatcow #931 doesn't fix this issue for me – I'm able to reproduce, with that fix applied, using the steps detailed in the OP.
stopthatcow commentedon Feb 22, 2018
Ok @zx8 try now. I had developed a test case that I thought was representative of your use case but it was not verbatim, now it is. I want to add a few more test cases but I think this fixes the issue.
zx8 commentedon Feb 22, 2018
Your new commit seems to fix the issue, thanks!
stopthatcow commentedon Feb 23, 2018
@zx8 thats great, I rolled up the fix for this and #925 into PR #930 as it was a bit of an intertwined refactor. Feel free to take a look.
Fix bash completion when defaults are present and the way subcommands…
Fix bash completion when defaults are present and the way subcommands…
Fix bash completion when defaults are present and the way subcommands…
Fix bash completion when defaults are present and the way subcommands…
Fix bash completion when defaults are present and the way subcommands…
Fix bash completion when defaults are present and the way subcommands…
Merge #1576
Merge #37
Update click to 7.0 (#97)