Can't setup completions on ZSH
Author: deluccaCreated Oct 21, 2022Updated Jun 2, 2026
Hey everyone
I'm trying to setup completions on ZSH but not being able to do so. My cdi command works properly (if I type cdi and then Enter if opens a FZF selector as expected), but for some reason the completions are not working.
Here is my ~/.zshrc file: https://pastebin.com/4GM136Tf
Here is what I've already discovered:
- Even if I use the approach suggested on the readme (
rm ~/.zcompdump*; compinit) it doesn't work - When I type
cd <tab>it opens a FZF selector containing only directories inside my current pwd. This happens because of the plugin"Aloxaf/fzf-tab". Even if I remove it it doesn't work - I've already tried to remove everything from my
zshrcfile, leaving only loading thecompinitand the eval fromzoxide. It doesn't work. The only thing that changes is that now when I press tab aftercdit appears the common tab selection fromzsh(without FZF) - Here is the output from
$_comps[cd]:__zoxide_z_complete - If I run
__zoxide_z_completedirectly from my terminal it opens the FZF selector as expected (that was supposed to be opened when I press tab - I tried to change the completion for a different tool. What I did was setting
$_comps[zi] = _zoxide_z_complete(ziis my plugin manager). When I do this and I try to open the completion forziit opens the completion forcd. So, it seems that the problem is indeed related to__zoxide_z_complete, but only when it is attached as completion for some reason
What should I do?
Source: ajeetdsouza/zoxide