1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

Fixed order of match precedence and match_anywhere example

This commit is contained in:
Calum Smith 2016-09-29 17:00:31 -04:00
parent c4d82b1888
commit 0ecf1b4e3b
2 changed files with 3 additions and 3 deletions

View File

@ -193,8 +193,8 @@ def find_matches(entries, needles, check_entries=True):
lambda entry: not is_cwd(entry) and path_exists(entry), lambda entry: not is_cwd(entry) and path_exists(entry),
chain( chain(
match_consecutive(needles, data, ignore_case), match_consecutive(needles, data, ignore_case),
match_fuzzy(needles, data, ignore_case), match_anywhere(needles, data, ignore_case),
match_anywhere(needles, data, ignore_case))) match_fuzzy(needles, data, ignore_case)))
def handle_tab_completion(needle, entries): def handle_tab_completion(needle, entries):

View File

@ -32,7 +32,7 @@ def match_anywhere(needles, haystack, ignore_case=False):
] ]
result = [ result = [
(path='/moo/foo/baz', weight=10), (path='/foo/bar/baz', weight=10),
(path='/foo/baz', weight=10), (path='/foo/baz', weight=10),
] ]
""" """