Closed manuel-uberti closed 5 years ago
Hi,
This is definitely not intended, but I can reproduce this as well.
However, it doesn't look like something I can easily fix. The code has already been written to generate the completions once, after the function definition: https://github.com/jethrokuan/z/blob/master/conf.d/z.fish#L40
Completions do indeed work after manually running __z_complete
. This seems to be a situation where the lines here:
https://github.com/jethrokuan/z/blob/master/conf.d/z.fish#L23-L27
takes a while to define the function, and completes only after __z_complete
is run, causing the completions to be produced before the function is defined and are hence invalid.
I'm not really familiar with Fish code, so I'm not sure how to help here. You can count me in for tests, though. :)
what I was trying to get is that there's nothing much I can do here, the behaviour we're seeing is (I'm guessing) a result of some race condition that arises from how fish evaluates the code.
Probably worth mentioning @faho then, and see if he's got some clue about this.
Simple: There is already a thing called "j", and fish ships completions for it.
Since z does not ship a completion file, it'll still autoload that one, and that includes:
complete -c j -e
which will erase all completions for the "j" command.
Thanks @faho, I confirm that using the default z
instead of j
works as expected.
Thanks @faho, closing as it's resolved
Well, actually I'd like to have j working, but it's ok. :)
Hi,
first of all thanks for
z
.I am using latest
z
(updated throughfisher
) on Fish 3.0.0, and I have this in myconfig.fish
:Whenever I try to jump to a previously visited directory, hitting TAB does not complete the path. So, for instance:
If I hit Enter, I end up in a directory (which in this particular case is the directory I want, but it isn't always the case).
But if I hit TAB, I get nothing:
Is this intended?