zoxide icon indicating copy to clipboard operation
zoxide copied to clipboard

Case insensitivity

Open christianbundy opened this issue 5 years ago • 5 comments

Hi. My filesystem is case-insensitive but case-preserving, and I've noticed that I have both foo and Foo in my zoxide database. Is there some way to tell zoxide that these are the same directory and should be counted together? Thanks!

christianbundy avatar Oct 27 '20 18:10 christianbundy

Hey Christian, what filesystem are you using?

This sounds like a problem that could be fixed with a simple environment variable that converts all paths to lowercase/uppercase, but I'm not sure how Unicode characters would be treated in that case.

ajeetdsouza avatar Oct 27 '20 18:10 ajeetdsouza

Hey! I'm using 'APFS (Encrypted)', more info here: https://support.apple.com/guide/disk-utility/file-system-formats-available-in-disk-utility-dsku19ed921c/mac

Happy to be a test subject, if you have any ideas. Thanks for your work on this project!

christianbundy avatar Oct 27 '20 18:10 christianbundy

Thanks! Could you try adding foo and Foo using export _ZO_RESOLVE_SYMLINKS=1 and tell me your findings?

ajeetdsouza avatar Oct 27 '20 19:10 ajeetdsouza

That works! The database now keeps only the correct name. The only problem I've been able to create (which is convoluted):

mkdir DIRECTORY
cd DIRECTORY
cd -
rm -rf DIRECTORY
mkdir directory
cd directory

Now my database has both ~/directory and ~/DIRECTORY, which isn't possible on my filesystem. Small potatoes, but maybe something someone can fix if they're bored and feel like throwing time at it. 🤷

christianbundy avatar Oct 27 '20 19:10 christianbundy