Pathbar completion should be case sensitive
What Happened?
When typing a path into the pathbar, I typed a directory name with an upper case letter - it was completed automatically even though the actual directory name had a lower case letter. Pressing enter then unexpectedly produced the "Directory not found" view.
Steps to Reproduce
- Type a path to a folder starting with a lower case letter
- Type the first letter of the folder in uppercase (suggested completion should appear)
- Press TAB to accept the suggested completion
- Press Enter
- See the "Directory not found" view
Expected Behavior
No suggested completion should appear when the incorrect case is typed (all suggested completions should actually exist).
OS Version
6.x (Odin)
Software Version
Compiled from git
Log Output
No response
Hardware Info
No response
I agree that whatever's suggested by the app should be a real folder in the system. But if I may suggest an alternate solution, it would probably be even nicer to fix the capitalization of folders entered in the path bar. This is similar to how fish works by default, or how bash works with case sensitivity disabled. For example, if you type ~/docu it would suggest and correct to ~/Documents. It would be more effort to implement, but significantly more forgiving.
I see this as working by correcting the last element in the path. So once you type a / it would fix the capitalization there, but whatever "word" you're currently writing would be corrected.
@mcclurgm Yes, probably preferable but quite tricky to implement. If you have two folders Documents and docker say, and type doc it would have to show completion docker - continuing to type docu would then have to autocorrect the completion to Documents.
That's essentially what we already do if you type a lower case path to a capitalized directory. For example, I have two directories in my Documents folder, linux-config and Lisp. If I type lis it already corrects to Lisp, just not the other way round (Lin does not get corrected to linux-config, which is what you're reporting here). I would have to look at the code, but it seems like we already would have most of the plumbing in place to implement the direction from upper to lower case as well?
If it would be much more difficult, I'll break my suggestion into a new issue, so that we have a failing behavior here (suggesting nonexistent folders) and a preferred but more ambitious behavior on the wishlist separately.
If you are happy to have a go at fixing this then please go ahead :smile:. It may be easier than I thought.
Is this related to this weird behavior?
https://user-images.githubusercontent.com/15933604/175820322-0c70aab6-0d97-493c-96e2-6b4d21475555.mp4
This happens to me every now and again with different paths. I'll start typing, all lower case, and it will capitalize the first letter and jump my cursor back to the beginning.
Note, this is what is in /usr/share/icons for me at the moment:
Adwaita default elementary elementary.tar.gz gnome hicolor HighContrast locolor mozc ubuntu-mono-dark ubuntu-mono-light
... but only when starting from my home directory?
@joshuamars You may like to try out #2059 to see whether it fixes you issue.
@joshuamars You may like to try out #2059 to see whether it fixes you issue.
Works for me, I think.