1
0
mirror of https://github.com/wting/autojump synced 2024-09-28 22:10:45 +00:00

remove current directory from matches

This commit is contained in:
William Ting 2013-12-17 12:15:39 -06:00
parent 1472b417c3
commit d115075295

View File

@ -202,8 +202,9 @@ def detect_smartcase(needles):
def find_matches(config, needles, count=1):
"""Return [count] paths matching needles."""
entriefy = lambda tup: Entry(*tup)
not_cwd = lambda entry: entry.path != os.getcwdu()
data = sorted(
imap(entriefy, load(config).iteritems()),
ifilter(not_cwd, imap(entriefy, load(config).iteritems())),
key=attrgetter('weight'),
reverse=True)