-
-
Notifications
You must be signed in to change notification settings - Fork 129
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
Clarify that filtering by prefix is not required in completers #139
Comments
really?
I have to use |
The problem seems to be related to zsh. |
I feel like the choices completer (and probably the others too) should not filter their results and defer to the validator to do the filtering. As it stands, if I want to do something like case-insensitive completion, I have to override the choices completer because the results are already filtered before they get to the validator. Or am I misunderstanding the purpose of the validator? |
@haifengkao, it would be really awesome if a test could be added for this behavior. I'd like to create a pexpect test that would verify completions end-to-end in bash and zsh. Do you want to help? @evanunderscore, the choices completer is presented as an example. The validator was added to this architecture after I first designed it, so I'm treating it as a general purpose filtering step. One of its functions is to filter the completions by prefix. The completer may also do so, for example if filtering will reduce the amount of work done (like when requesting completions from a remote API). Case insensitive completion is not generally supported. If you want it supported, please open another issue. We'll need to update the docs, think about how to communicate case insensitivity to completers, and add a CaseInsensitiveValidator. |
@kislyuk sure. what do you need? |
A test for the zsh behavior that you described (positive and negative test assertions). You may have to modify travis.yml to get zsh and pexpect installed. |
The current tests are pure python and they don't involve the shell at all. |
We would need a new test case that uses pexpect. I would like to have it added in a new class in |
I was doing a little research (http://www.zsh.org/mla/users/2013/msg00612.html). |
See #137
The text was updated successfully, but these errors were encountered: