From 196d5233a05596beab5e16a74dbe289c8b5826a0 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 23 Jun 2014 22:19:14 +0200 Subject: [PATCH] Fix `is_cwd` for symlinks Since `pwd` is a resolved symlink, the comparison in `is_cwd` needs to use the real path, too. --- bin/autojump | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autojump b/bin/autojump index e087cc8..0ad7ab9 100755 --- a/bin/autojump +++ b/bin/autojump @@ -172,7 +172,7 @@ def find_matches(entries, needles, check_entries=True): # using closure to prevent constantly hitting hdd def is_cwd(entry): - return entry.path == pwd + return os.path.realpath(entry.path) == pwd if check_entries: path_exists = lambda entry: os.path.exists(entry.path)