rupa / z

z - jump around
Do What The F*ck You Want To Public License
16.4k stars 1.17k forks source link

z not creating .z file in zsh #147

Closed wshanks closed 9 years ago

wshanks commented 9 years ago

Using zsh 5.0.7 without a .zshrc file, cd does not add to the ~/.z file. With bash 4.3.33, cd does add to the ~/.z file.

rupa commented 9 years ago

so, you're not loading z, but expecting it to work?

wshanks commented 9 years ago

I activate it manually in the shell. Creating a new .zshrc file with just the z activation command in it also does not populate ~/.z. Sorry, I thought the fact that I said it worked with bash would indicate that I knew how it should be set up. The z command itself is defined and can jump to places that were added to ~/.z via bash. I'm not sure what else to look at to debug it. This is in an updated Arch linux system.

rupa commented 9 years ago

fair enough. I don't use zsh so these are mostly educated guesses:

tomhoover commented 9 years ago

I just installed z today under Ubuntu 14.04 and can confirm the same issue (i.e. ~/.z was not created when running under zsh; however, when I switched to bash it was created). After running under bash, and then switching back to zsh, z will read the entries in ~/.z; however, cd will not add new entries as long as I'm in zsh.

fyi- installed z using homebrew under OS X (Yosemite), and it's working fine with either bash or zsh. (zsh 5.0.2 in Linux and 5.0.5 in OS X)

tomhoover commented 9 years ago

Additionally, compctl is present on the Linux machine.

tomhoover commented 9 years ago

Digging a bit more, I noticed that brew install z under OS X was downloading and installing from https://github.com/rupa/z/archive/v1.8.tar.gz. I downloaded the same tar file to my Linux box, and everything now works under zsh.

I'll do some more digging when I have time.

wshanks commented 9 years ago

That is a great find, Tom. It looks like there are 29 commits between v1.8 and HEAD (here is the comparison url for reference: https://github.com/rupa/z/compare/v1.8...master), so if nothing else we can test out different commits to see where it breaks.

tomhoover commented 9 years ago

I found it--commit c507bdd is what broke zsh. I just submitted PR #148 to fix it.

rupa commented 9 years ago

thanks, merged.