jethrokuan / z

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

Z_CMD reset by fisher refresh #85

Closed pikeas closed 3 years ago

pikeas commented 4 years ago
$ echo $Z_CMD
j
$ fisher
To completely erase z's data, remove:
/Users/pikeas/.local/share/z/data
fetching https://codeload.github.com/jethrokuan/z/tar.gz/master
linking ~/.config/fish/conf.d/done.fish
linking ~/.config/fish/functions/__z.fish
linking ~/.config/fish/functions/__z_add.fish
linking ~/.config/fish/functions/__z_clean.fish
linking ~/.config/fish/functions/__z_complete.fish
linking ~/.config/fish/conf.d/z.fish
...
updated 4 packages in 2.26s
$ echo $Z_CMD
z
jethrokuan commented 4 years ago

The problem is now fisher does a complete teardown and setup for all plugins. it runs:

https://github.com/jethrokuan/z/blob/master/functions/uninstall.fish

So now it's between:

  1. Having lingering environment variables after an uninstall, or
  2. the behaviour you're seeing
jorgebucaran commented 3 years ago

Fixed in 4.x. :tada:

Fisher now supports install, update and uninstall events, which we could use to load and erase variables.

demartini commented 3 years ago

I am still having the same problem.

fish 3.1.2 fisher 4.1.0

jorgebucaran commented 3 years ago

@demartini Are you using the latest z? Whoops, got mixed up with @jethrokuan's other plugin, fzf, which we just fixed the other day. Anyhow, the behavior described in this comment should be fixed in Fisher 4.x, but we need to update z as well.

demartini commented 3 years ago

@demartini ~Are you using the latest z?~ Whoops, got mixed up with @jethrokuan's other plugin, fzf, which we just fixed the other day. Anyhow, the behavior described in this comment should be fixed in Fisher 4.x, but we need to update z as well.

~Yes, I installed and reinstalled it several times, I even tested it with Oh My Fish.~

No problem, I'll wait. Thanks for the quick feedback.

jorgebucaran commented 3 years ago

I think this should do it (https://github.com/jethrokuan/z/pull/94).

▸ fisher install jorgebucaran/z@patch-1
fisher install version 4.1.0
fetching https://codeload.github.com/jorgebucaran/z/tar.gz/patch-1
installing jorgebucaran/z@patch-1
           /Users/jb/.config/fish/functions/__z.fish
           /Users/jb/.config/fish/functions/__z_add.fish
           /Users/jb/.config/fish/functions/__z_clean.fish
           /Users/jb/.config/fish/functions/__z_complete.fish
           /Users/jb/.config/fish/conf.d/z.fish
installed 1 plugin/s
▸ echo $Z_CMD
z
▸ set Z_CMD j
▸ fisher update jorgebucaran/z@patch-1 
fisher update version 4.1.0
fetching https://codeload.github.com/jorgebucaran/z/tar.gz/patch-1
installing jorgebucaran/z@patch-1
           /Users/jb/.config/fish/functions/__z.fish
           /Users/jb/.config/fish/functions/__z_add.fish
           /Users/jb/.config/fish/functions/__z_clean.fish
           /Users/jb/.config/fish/functions/__z_complete.fish
           /Users/jb/.config/fish/conf.d/z.fish
updated 1 plugin/s
▸ echo $Z_CMD
j

cc @jethrokuan @demartini @pikeas

demartini commented 3 years ago

I think this should do it (#94).

Many thank @jorgebucaran, it's working like a charm.

jorgebucaran commented 3 years ago

@jethrokuan Close 😉