Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 10, 2017

  1. Smart case sensitivity matching by default

    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
    ericbn committed Nov 10, 2017
    Configuration menu
    Copy the full SHA
    86b43b4 View commit details
    Browse the repository at this point in the history