Eric Nielsen
Eric Nielsen
If you look closer I'm even removing some of the original complexity. For example, I'm removing the ihi_rank and all the extra logic related to it.
Could also `touch` the file if it does not exist. This would remove the need for changes like https://github.com/rupa/z/commit/78f0d97 and tests like # no file yet [ -f "$datafile" ]...
I also first though smart-case would make the user experience better. But: Consider these directories with their respective "frecencies": ``` 3 /tmp/foo/bar 5 /tmp/foo/Bar 8 /tmp/Bar 13 /tmp/bar 21 /tmp...
Maybe `z` could give users the option to use either case sensitive, insensitive, or smart-case matching, having one of these as default. @rupa, thoughts?
Created PR #221 changing the default matching strategy to smart case, and adding two new parameters to force case insensitive (`-i`) or case sensitive (`-s`) matching. Solution is just 1...
Could not reproduce with [Raspbian x86 on a VM](http://www.aoakley.com/articles/2017-07-04-raspbian-x86-virtualbox.php). But I suspect this has to do with the line if [ "$echo" ]; then echo "$cd"; else builtin cd "$cd";...
As I understand (see https://github.com/rupa/z/issues/208#issuecomment-335465026), the `-x` is already intended to be used with a regexp $ z -x foo meaning remove the current directory from the datafile, AND change...
My suggested changes at #214 fix this. I'm replacing the `gsub` by an `index` call.
@fictionic, @rupa, this gsub(/[\(\)\[\]\|]/, "\\\\&", clean_short) is escaping special characters, so the escaped string can be used with a regular expression matching at if( matches[x] && x !~ clean_short )...
It uses a "prefer case sensitive" algorithm. See examples at https://github.com/rupa/z/issues/209#issuecomment-342682486