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

Reduce lag for using when using sshfs mounts caused by checking pwd.

This commit is contained in:
William Ting 2012-12-18 11:33:36 -06:00
parent a99183bf8b
commit 182400ae8c

View File

@ -34,7 +34,7 @@ import re
import shutil import shutil
from tempfile import NamedTemporaryFile from tempfile import NamedTemporaryFile
VERSION = 'release-v21.2.1' VERSION = 'release-v21.2.2'
MAX_KEYWEIGHT = 1000 MAX_KEYWEIGHT = 1000
MAX_STORED_PATHS = 1000 MAX_STORED_PATHS = 1000
COMPLETION_SEPARATOR = '__' COMPLETION_SEPARATOR = '__'
@ -369,7 +369,9 @@ def find_matches(db, patterns, max_matches=1, ignore_case=False, fuzzy=False):
for path, _ in dirs: for path, _ in dirs:
# avoid jumping to current directory # avoid jumping to current directory
if current_dir == decode(os.path.realpath(path)) : if KEEP_SYMLINKS and current_dir == decode(os.path.realpath(path)):
continue
elif current_dir == path:
continue continue
found, tmp = True, path found, tmp = True, path
@ -455,4 +457,5 @@ def shell_utility():
return True return True
if __name__ == "__main__": if __name__ == "__main__":
if not shell_utility(): sys.exit(1) if not shell_utility():
sys.exit(1)