mirror of
				https://github.com/wting/autojump
				synced 2025-06-13 12:54:07 +00:00 
			
		
		
		
	Merge a9d2993f31 into ee21082751
				
					
				
			This commit is contained in:
		
						commit
						1138563b99
					
				| @ -1,7 +1,7 @@ | ||||
| NAME | ||||
| ---- | ||||
| 
 | ||||
| autojump - a faster way to navigate your filesystem | ||||
| autojump - a faster way to navigate your filesystem [](https://travis-ci.org/floydpink/autojump) | ||||
| 
 | ||||
| DESCRIPTION | ||||
| ----------- | ||||
|  | ||||
| @ -75,9 +75,10 @@ def match_consecutive(needles, haystack, ignore_case=False): | ||||
|             (path='/foo/baz', weight=10), | ||||
|         ] | ||||
|     """ | ||||
|     regex_no_sep = '[^' + os.sep + ']*' | ||||
|     sep = '\\\\' if os.sep == '\\' else os.sep | ||||
|     regex_no_sep = '[^' + sep + ']*' | ||||
|     regex_no_sep_end = regex_no_sep + '$' | ||||
|     regex_one_sep = regex_no_sep + os.sep + regex_no_sep | ||||
|     regex_one_sep = regex_no_sep + sep + regex_no_sep | ||||
|     regex_needle = regex_one_sep.join(imap(re.escape, needles)) + regex_no_sep_end | ||||
|     regex_flags = re.IGNORECASE | re.UNICODE if ignore_case else re.UNICODE | ||||
|     found = lambda entry: re.search( | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user