agkozak/zsh-z

Expanding directories broken since d421d84

levito opened this issue · 7 comments

I'm using this on the native zsh 5.7.1 on macOS Catalina 10.15.7. See my dotfiles here for details: https://github.com/levito/dotfiles

Assuming I have a directory ~/foo/bar, and I enter z bar[tab]:

Before d421d84, this was expanded to ~/foo/bar/ like expected. (https://github.com/rupa/z behaves the same way)

After that commit, it will be expanded to Users/xxx/foo/bar/ – notice the missing leading /.

This might relate to #29.

Edit: The same happens to paths outside of $HOME, e. g. /Applitactions, triggered with z Appl[tab]:

Before d421d84, this is expanded correctly to /Applications/.

After that commit, it expands to Applications/ with the leading / missing.

I’m sorry to hear you’re having that problem. I’ll try to help.

Could you first confirm that you’re using the latest version? Try going to the plugin directory and typing

git log

The latest commit is

8eb87042639b88c7dce8d792a61cafd9c961dc0c

from January 31.

OK, I’m using your dotfiles, and I can see exactly what you mean. ZSH-z is actually working properly by itself, but it’s interacting badly with one or more of the other plugins. Its output must have diverged from that of rupa/z in some subtle way. Give me a little time, and I’ll figure this out.

OK, I’ve got the solution.

rupa/z and ZSH-z both used to use small decimal fractions for ranks. rupa/z switched to large integers recently because bash doesn’t work well with fractions. I’ve avoided swtiching to large integers because zsh is great with math and I prefer the way the smaller numbers look.

The commit you discovered is the correct solution. I was experimenting doing things the way rupa/z does them. It’s clear to me that it’s time to switch over to large integers so that we don’t have these sorts of problems with integrating all the various tools.

Can you wait a day or two while I test things?

Thanks so much for bringing this issue to my attention and helping to make the plugin better.

You may also use the version on the develop branch for now.

Thanks a lot for taking care of this so quickly! I just checked out develop – the issue is fixed there and it seems to work perfectly fine. If I encounter any problems, I'll let you know.

Hi, I haven't had any problems so far with the change in develop. When do you plan to merge it to master?

It's on the master branch now. Thanks so much for helping to improve the plugin.