Closed wshanks closed 9 years ago
so, you're not loading z
, but expecting it to work?
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.
fair enough. I don't use zsh so these are mostly educated guesses:
precmd_functions
. Most likely z's _z_precmd
function is not getting added to them.z
uses the presence of compctl
to determine it's running under zsh (line 209 in z.sh
). This is not ideal, but apparently $SHELL
is unreliable, and for lack of better idea, that's what we do. Apparently it's possible to configure zsh completions in ways that this command may not be present, in which case the script thinks it's running under bash. maybe that's what's happening? Is compctl
present?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)
Additionally, compctl
is present on the Linux machine.
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.
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.
I found it--commit c507bdd
is what broke zsh. I just submitted PR #148 to fix it.
thanks, merged.
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.