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

Directory auto-complete should be case-insensitive #1347

Closed
uok opened this Issue Feb 11, 2015 · 10 comments

Comments

Projects
None yet
7 participants
@uok
Copy link
Contributor

uok commented Feb 11, 2015

auto-complete for directories is a really helpful feature, please make it case-insensitive

c:\A
c:\B
c:\C

typing "c:\b" results in

expected
c:\B

@calmh calmh added the enhancement label Feb 12, 2015

@calmh

This comment has been minimized.

Copy link
Member

calmh commented Feb 12, 2015

(file system specific though)

@dzarda

This comment has been minimized.

Copy link
Contributor

dzarda commented Mar 13, 2015

Maybe I'll have a look at this during the weekend, just to get my head around it.

@dzarda

This comment has been minimized.

Copy link
Contributor

dzarda commented Mar 17, 2015

The matching currently works using Glob. This is the culprit, since this is always case-sensitive. It would be rewritten.

Also, is a condition runtime.GOOS == "windows" a good enough approximation of "file system specificity" ? I mean, how can I easily and quickly detect if a path is on a case-insensitive partition?

@calmh

This comment has been minimized.

Copy link
Member

calmh commented Mar 17, 2015

You probably can't, but the system type is a good approximation, and probably an even better approximation of what behavior the user expects (i.e. a Linux user is probably not shocked if she gets case sensitive completion on a FAT filesystem; her shell will do the same).

@sciurius

This comment has been minimized.

Copy link
Contributor

sciurius commented Mar 17, 2015

The best test is to create a dummy file FooBar.txt and check for the existence of foobar.txt .

@calmh

This comment has been minimized.

Copy link
Member

calmh commented Mar 17, 2015

A folder may be on a read only filesystem (if the .stfolder file has been created manually), or may span filesystems for that matter. But yes, we could do a probe. I've considered it as well for things like whether we should use IgnorePermissions or not etc.

@edsonmedina

This comment has been minimized.

Copy link

edsonmedina commented Mar 22, 2017

Shouldn't a fix for this be done in Glob's repository instead?

@calmh calmh removed this from the Unplanned (Contributions Welcome) milestone Feb 11, 2018

@bennofs

This comment has been minimized.

Copy link
Contributor

bennofs commented Oct 23, 2018

shoudn't auto-complete be always case-insensitive? Even if I am on Linux, I usually don't have files that differ only in case so it still can be convenient to only type lowercase to match an uppercase file. Since this is only auto-completion, I think that should be fine as long as we sort exact matches before "fuzzy case" ones?

@AudriusButkevicius

This comment has been minimized.

Copy link
Member

AudriusButkevicius commented Oct 23, 2018

Agree, but this needs a custom implementation of globbing.

@bennofs

This comment has been minimized.

Copy link
Contributor

bennofs commented Oct 25, 2018

OK, i'll try to impment this then

@calmh calmh added this to the v0.14.53 milestone Nov 7, 2018

@calmh calmh changed the title Directory auto-complete is case-sensitive Directory auto-complete should be case-insensitive Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.