wting/autojump

autojump deletes history

Closed this issue · 13 comments

I've been using autojump on my Mac OSX Lion for the past month or so, and have had to cp the autojump.txt.bac to the autojump.txt file a number of times because the autojump.txt deletes is purged every so often.

Do you have a missing or empty autojump, or are just some entries missing?

The autojump.txt file empties, but it's still there. After it deletes all the entries, it starts from scratch to repopulate them.

Are you able to reproduce it consistently? If so, can you list the reproduction steps?

It repeatedly occurs. There's nothing required to reproduce it – the file just empties without me doing anything. All I do is use it ( with "j someDir" ), and then find at some point that the autojump.txt file has been purged

What version are you running? How did you install it?

@wting - I actually have this same problem.

For me, it feels like it is related to nvm, but I can't directly confirm that. I say it's related to nvm because whenever it does reset, the only remaining entry is an nvm entry.

$ j -v
autojump release-v21.5.8

Installed via brew

What can I do to help resolve this?

Also, the weight for the nvm directory is always substantially higher than any of my other dir

I'm closing this issue since autojump has been basically rewritten from scratch since this issue's original date.

If you can reproduce this error on v22.0 (master HEAD) then please reopen.

It is happening to me:

$ j --version
autojump v22.2.2

I did the standard archlinux installation. The file seems to reset sometimes, when I open a new terminal, but looks very random..

If a open a lot of terminals, at the same time, I can see the file becoming empty.

sxe commented

Same happens to me on archlinux version autojump v22.2.2 with bash.

Copied my comment from #355:

I'm using Arch Linux. Since autojump v22.2.2, like @sxe and @fernandogrd mentioned, the content of ~/.local/share/autojump/autojump.txt is randomly purged. So the history was totally lost. V22.2.4 still has the same problem.

This bug practically makes autojump useless. This is very frustrating to us, long time users of autojump.

@joelthelion @wting Please look into this issue at your earliest convenience. Thanks.

I'm using chruby which may also hook up $PROMPT_COMMAND.
https://github.com/postmodern/chruby

May this be the cause of this issue?

[neng@dolphin:]$ echo $PROMPT_COMMAND
printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/
}" ; autojump_add_to_database

wting commented

I have a pretty good idea of the root cause, let's consolidate conversation to #391.