Skip to content
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

Closed
iven opened this issue Oct 1, 2012 · 6 comments
Closed

Don't ignore case in completions when input contains uppercase #335

iven opened this issue Oct 1, 2012 · 6 comments
Milestone

Comments

@iven
Copy link

iven commented Oct 1, 2012

When people inputs an uppercase character, they usually expect more precise results.(Or they enabled the capslock)

@ridiculousfish
Copy link
Member

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?

@iven
Copy link
Author

iven commented Oct 8, 2012

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:

mv elementaryos-unstable-amd64.20120902.iso ElementaryOS-Unstable-AMD64.20120902.iso

and it always suggests:

mv elementaryos-unstable-amd64.20120902.iso elementaryos-unstable-amd64.20120902.iso

and I don't know if I'm typed correctly.

@twm
Copy link

twm commented Oct 15, 2012

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).

@iven
Copy link
Author

iven commented Oct 15, 2012

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':

~ $ cd down
    cd Downloads/

@twm
Copy link

twm commented Oct 28, 2012

That would also be a good solution.

@ridiculousfish
Copy link
Member

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
8d4a701..85fdf58 master -> master

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants