Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Don't ignore case in completions when input contains uppercase #335
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).