z icon indicating copy to clipboard operation
z copied to clipboard

Seems to be case sensitive

Open ghost opened this issue 8 years ago • 3 comments

I thought this was meant to be case-insensitive (and I wish it was), it frustrates me constantly that it doesn't seem to be.

$ z -l ia
common:    /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad
0.5        /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad/2017
0.75       /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad/2016
1.5        /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad/2016/Challenge
4.5        /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad
16         /Users/George/Documents/Subjects/Computing/BritishInformaticsOlympiad/2015
$ z -l IA
common:    /Users/George/Documents/Subjects/Maths/IA
0.5        /Users/George/Documents/Subjects/Maths/IA/Examples
7          /Users/George/Documents/Subjects/Maths/IA
19.5       /Users/George/Documents/Subjects/Maths/IA/Resources
149.5      /Users/George/Documents/Subjects/Maths/IA/LaTeX

ghost avatar Nov 08 '17 19:11 ghost

It uses a "prefer case sensitive" algorithm. See examples at https://github.com/rupa/z/issues/209#issuecomment-342682486

ericbn avatar Nov 08 '17 19:11 ericbn

I also wish z to be case-insensitive. I am on MacOS.

rahul286 avatar Feb 04 '18 10:02 rahul286

I've submitted PR #221 that allows smart case sensitivity matching by default, and adds parameters to force case insensitive or case sensitive matching. Solution is just 1 LOC bigger than the original implementation.

ericbn avatar Feb 04 '18 12:02 ericbn