-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Smart case sensitivity matching by default #221
base: master
Are you sure you want to change the base?
Conversation
and add parameters to force case insensitive (`-i`) or case sensitive (`-s`) matching. Also rename `t` variable in main awk script to `now`, as used in the `--add` awk script, use constant regular expression instead of string, and add double quotes to shell script variables. There are minor changes from smart-case to the original "prefer case sensitive" implementation. Considering these directories with their respective 'frecencies': 3 /tmp/foo/bar 5 /tmp/foo/Baz 8 /tmp/Baz 13 /tmp/bar 21 /tmp These would be the results of different queries with the two approaches, considering a filesystem that allows directories with same names and different cases: | query | smart-case | prefer case sensitive | |-------|--------------|-----------------------| | tm | /tmp | /tmp | | Tm | (nothing) | /tmp | | ba | /tmp/bar | /tmp/bar | | Ba | /tmp/Baz | /tmp/Baz | | fo ba | /tmp/foo/Baz | /tmp/foo/bar | | fo Ba | /tmp/foo/Baz | /tmp/foo/Baz | Fixes rupa#209
Random question but how do I cd by index/number? |
You should probably file a new issue with your question, to avoid non-related discussions here. Short answer: this is not implemented by |
Sorry about that brain fart, not sure why I didn't do it at the time. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a LOT of added complexity for something I believe very few people would use. I would lean towards reject.
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. |
and add parameters to force case insensitive (
-i
) or case sensitive (-s
) matching.Also rename
t
variable in main awk script tonow
, as used in the--add
awk script, use constant regular expression instead of string, and add double quotes to shell script variables.There are minor changes from smart-case to the original "prefer case sensitive" implementation.
Considering these directories with their respective 'frecencies':
These would be the results of different queries with the two approaches, considering a filesystem that allows directories with same names and different cases:
Fixes #209