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
Don't ignore case in completions when input contains uppercase #335
Comments
I see your point. On the other hand, sometimes I type two capital letters accidentally. By completions, you're referring to the autosuggestions that appear automatically, right? For ordinary completions, completions that match case win-out over those that do not; we may not be so careful with autosuggestions. Is there a particular reproducible case you have in mind? |
I just think it a little confused when I'm typing upper-case letters but it autosuggests lower-case letters. For example, when I want to type:
and it always suggests:
and I don't know if I'm typed correctly. |
This confuses me on a regular basis too, mainly because the case of what you type is changed to match the autocompletion, and this is done even for commands where the input is more important than the completion. For example, if I want to create a directory called "double" in my home directory I type "mkdir do" and see this (bolding the completion): ~ > mkdir Documents/ When this happens I invariably think that I typo'd and start backspacing to fix the problem—but of course, I didn't do anything wrong. I'd expect user input to remain immutable and only change at argument boundaries. Say I wanted to go to my Downloads directory, and typed "cd down". I should see this: ~ > cd downloads/ And after I hit tab: ~ > cd Downloads/ While I wouldn't say that this behavior would be entirely unsurprising, it's much less so than breaking the instant-feedback loop that normally exists when typing. It's not possible to accurately convey both the case of the input and the case of the completion without displaying them side by side. The closest you could probably get is only underlining the parts of the input which actually match the completion (in the above example, "d" is not underlined, while "o" is). |
I think it will be better if the autocompletions display seperately, for example, in the next line. And we'll know both what we've typed and what we'll get if we press 'ctrl-f':
|
That would also be a good solution. |
I changed it so that when the last token contains capital letters, we use the input case, not the autosuggestion case, as suggested in this issue. To git@github.com:fish-shell/fish-shell.git |
When people inputs an uppercase character, they usually expect more precise results.(Or they enabled the capslock)
The text was updated successfully, but these errors were encountered: