Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

entries variable being cleared when running on Windows #526

Closed
mapitman opened this issue Apr 4, 2018 · 1 comment
Closed

entries variable being cleared when running on Windows #526

mapitman opened this issue Apr 4, 2018 · 1 comment

Comments

@mapitman
Copy link

mapitman commented Apr 4, 2018

Having a very strange problem running autojump on Windows 10. I've tried it with both python 2.7.14 and 3.6.5 with the same results.

When I use autojump, it just prints out a dot when I would have expected it to jump to a directory. I did some debugging and found that the entries variable was getting cleared while the code is running.

I added some code in autojump to dump out the values in the entries variable file right above and right below this code:

autojump/bin/autojump

Lines 191 to 195 in 6a529f4

data = sorted(
entries,
key=attrgetter('weight', 'path'),
reverse=True,
)

Here's the output:

C:\Users\mark\AppData\Local\autojump\bin>autojump src
Entry(path=u'C:\\Users\\mark\\src\\github\\mapitman\\autojump', weight=10.0)
Entry(path=u'c:\\Users\\mark', weight=10.0)
Entry(path=u'C:\\Users\\mark\\src', weight=14.142135623730951)
Entry(path=u'C:\\Users\\mark\\src\\github', weight=10.0)
.
C:\Users\mark\AppData\Local\autojump\bin>

As you can see, the list of entries is only printed once. My expectation is that it would be printed twice and then jump to the C:\Users\mark\src directory. Anyone have any ideas what's going on?

@wting
Copy link
Owner

wting commented Sep 7, 2018

It prints a . when there's no matching entries. src should have matched against multiple entries and returned a result, but I believe the root cause of this problem is #436.

I'm going to mark it as a dupe, but feel free to reopen if you think it's different.

@wting wting closed this as completed Sep 7, 2018
@wting wting added the duplicate label Sep 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants