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

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

Comments

Projects
None yet
3 participants
@iven

iven commented Oct 1, 2012

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

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Oct 3, 2012

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?

Member

ridiculousfish commented Oct 3, 2012

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

This comment has been minimized.

Show comment
Hide comment
@iven

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

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

This comment has been minimized.

Show comment
Hide comment
@twm

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

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

This comment has been minimized.

Show comment
Hide comment
@iven

iven 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/

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

This comment has been minimized.

Show comment
Hide comment
@twm

twm Oct 28, 2012

That would also be a good solution.

twm commented Oct 28, 2012

That would also be a good solution.

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish Jan 5, 2013

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

Member

ridiculousfish commented Jan 5, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment