-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
_pytest._argcomplete.FastFilesCompleter fails when no prefix specified #2748
Comments
Thanks @evanunderscore, would you like to open a PR with a fix? |
Sure, although I need someone to decide whether to suggest flags when there is no prefix. Current:
Fixed:
Alternate fixed:
|
argcomplete suggests flags too when there is no prefix, and this looks right, as you can use flags as well as paths/positional args in any order. But in this case, it makes sense to sort positional args after (or before) flags. But |
i believe for now we should simply try to keep current pytest behaviour |
The overall effect of this is that
pytest <tab>
ends up using bash's default completer which completes just the files (no flags). This can be fixed by modifying the offending line to check if the prefix is non-empty, but I'm not sure if the current behavior (when _ARC_DEBUG is unset) actually desired.To fix this and retain the current behavior, you could also modify
try_argcomplete
to callargcomplete.autocomplete(parser, always_complete_options=False)
.I'm using pytest 3.2.1.
(Be aware that kislyuk/argcomplete#225 may impact your ability to test this if you have installed pytest from a wheel.)
The text was updated successfully, but these errors were encountered: