rupa / z

z - jump around
Do What The F*ck You Want To Public License
16.28k stars 1.17k forks source link

Seems to be case sensitive #220

Open ghost opened 6 years ago

ghost commented 6 years ago

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
ericbn commented 6 years ago

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

rahul286 commented 6 years ago

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

ericbn commented 6 years ago

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.