ajeetdsouza/zoxide

Autocompletion for fish is not working on my system

Opened this issue · 4 comments

I am not sure if this feature is supported but looking through merged changes I am expecting that it would.

Currently I run zoxide with Fish on alacritty. It would be lovely if I could you tab to autocomplete the current word youŕe typing.

Could someone help me debug this issue?

+1 on this
Completions do not work for me neither in fish nor bash. I see that zoxide init fish outputs among others __zoxide_z_complete, so I guess it should work?..


Update:
Ok, I figured that out in my case.
So, the way z autocompletes is that by default it uses normal cd completions.
"Smart" completions are only enabled if two conditions are met:

  1. You entered your "guess" and a space after it
  2. Your guess has at least one candidate. If that is not true, z reports an error and that looks a bit weird in the terminal.

I think the autocompletion works, but not in the way cd autocompletion does, which is not compatible with my brain 😞

for now I replaced the configured zoxide autocompletion with the one found in __fish_complete_cd: (note that use zoxide through fisher)

# replace zoxide autocompletion with the default one for cd as it does not meet my expectations right now
complete -e $zoxide_cmd
complete -c $zoxide_cmd -a '(__fish_complete_cd)'
bs10x commented

same for me. this has been driving me crazy for months.

same for me on bash.