From 586ce0deeead5cac87aae3f3d294e3f8fe38d348 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 18 Dec 2012 15:46:24 +0100 Subject: [PATCH] Skip current_dir in find_matches for fuzzy=False, too --- bin/autojump | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/autojump b/bin/autojump index 2fb54c3..0c1a440 100755 --- a/bin/autojump +++ b/bin/autojump @@ -356,6 +356,9 @@ def find_matches(db, patterns, max_matches=1, ignore_case=False, fuzzy=False): # collisions: ignore lower weight paths if end not in end_dirs and (os.path.exists(d[0]) or TESTING): + # avoid jumping to current directory + if current_dir == os.path.realpath(d[0]): + continue end_dirs[end] = d[0] # find the first match (heighest weight)