-
Notifications
You must be signed in to change notification settings - Fork 54
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
Autocomplete: Tab behavior #9
Comments
This is how I implemented it in a really early version but I did not like it because there is already a command selected in the suggestion list so when you press tab I would assume this selected command is used. When I type "doc" and the first suggestion is "doctrine:cache:clear-metadata" and it is selected (given the behavior you suggest is implemented) I would need to press tab 3 times. One possibility would be not to focus a suggestion by default and only use your suggested behavior when no suggestion is selected but I assume that would not be very intuitive because there would be more different cases of behavior. Do you have a concrete case in mind in which the behavior you suggest would be easier to use? you want to use the "doctrine:cache:clear-result" command and want to type: But the much easier way would be to just write "clear-result" in the beginning as the autocompletion does not force you to start on the left side of the command. |
"doctrine:generate:entities" could be a good example. If I wan to use this comand, I would like to be able to type:
👍 for this. I assume that you would rarely use the first command anyway (especially true when you have a lot of commands, like in the "doctrine" ns). I think the most "difficult" part of the PR it to avoid unambiguous stops:
"nam" + tab should autocomplete to "namespace:sub:" as this is not ambiguous. |
What should happen wenn I type: I could autocompelete to "cache:" or "config:" or "container:" Currently the autocompletion list also shows all the doCtrine commands as suggestion too. |
Ideally I think you should stop autocompleting where the completion becomes ambiguous (multiple solutions). This would match the behavior of terminals. To continue either select a (sub)command or type more letters. That's would be the best thing to have imo but something different would be ok if this makes the code too complicated. Laszlo Korte [email protected] wrote:
|
Ok... I have started implementing this a separate branch: When the input is ambiguous the old behavior is used: When the input is the prefix of exactly one namespace: |
I won't have time to look at it before next friday. On 02/10/2013 09:37 PM, Laszlo Korte wrote:
|
Is this still active? If not, I'd suggesting closing. In case of interest, PR is welcomed of course. |
It would be great that tab stops after the first ":" where different commands are possible.
IE after "doct", tab should stop on "doctrine:"
The text was updated successfully, but these errors were encountered: