jethrokuan / z

Pure-fish z directory jumping
MIT License
1.26k stars 44 forks source link

Ability to retain a larger history of directories #83

Closed rien333 closed 4 years ago

rien333 commented 4 years ago

I've noticed that some directories that I haven't visited in a while are sometimes forgotten by z. This could be intended behavior, of course. Still, working on different projects, it's a bit of bummer that I can't navigate quickly to a directory I once frequented.

Is there a way to configure how fast z forgets directories? Is there some sort of variable I can tweak to increase its "history" size? Or would that go against the philosophy of the program?

jethrokuan commented 4 years ago

I don't think z ever forgets directories. There's however some confusing behaviour when z is run with sudo, resulting in the cache being otherwise write-protected. Are you doing anything sudo-related?

rien333 commented 4 years ago

Nope, I never run z in conjunction with sudo (or as any other user, for that matter).

Running fish from git master, btw. I just noticed I haven't upgraded fisher or z in a while, will see if this weird behavior persists after upgrading.

Oddly enough, ~/.local/share/z/data contained just 150 lines before I upgraded, which seems a bit low after more than a year of usage. Just now, I cd'ed to some directories that were not in the list, and they were added (the line count is now 152). So maybe this is fixed?

jethrokuan commented 4 years ago

I suspect it's because of the move of the cache file, to comply to XDG standards some time ago: https://github.com/jethrokuan/z/commit/c69b75ca43eb5e0c44f02e683029b1932fe0be33

rien333 commented 4 years ago

I have had this machine since 2018/2019, so that seems fairly unlikely. Anyway, I'll close this issue if it doesn't persist.

rien333 commented 4 years ago

Don't think this still happens, but will keep an eye out.