babarot / enhancd

:rocket: A next-generation cd command with your interactive filter
2.58k stars 109 forks source link

tab completion not working #206

Open chevdor opened 1 year ago

chevdor commented 1 year ago

What did you expect to happen?

cd <tab> should work

What actually happened?

cd <tab> does not trigger expansion/autocompletion.

Output

Additional context

I did run a zi update:

...
Updating: b4b4r07/enhancd
* b911969 - (tag: v2.5.1, origin/master, origin/HEAD) Release for v2.5.1 (#203) (2023-04-11) <github-actions[bot]>
* ...
ghost commented 1 year ago

Same. I can repro in the both iTerm/Terminal app.

svengreb commented 1 year ago

I can confirm that completion for file system structures stopped working. I tried to disable all other plugins that might conflict (e.g. Aloxaf/fzf-tab), but without success. @b4b4r07 Please let me know which information is required in order to help to debug this. As a maintainer I know that it is not easy to reproduce such problems without the necessary information so feel free to ask for whatever is needed.

GotoRen commented 1 year ago

I have also confirmed the same issue.

My solution was to comment out the line zi light b4b4r07/enhancd.

Additionally, I cloned the repository under ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/.zi/plugins. I reverted back to April 1st (commit: d224672), which was the last version I had previously used.

$ cd ${HOME}/.zi/plugins
$ git clone https://github.com/b4b4r07/enhancd.git
$ git checkout d224672

FYI: environment

svengreb commented 1 year ago

Downgrading can work as a temporary workaround, but lagging behind forever is actually not a permanent option. After digging into the changes in this repository I guess I found the simple “root cause“ of missing cd auto-completions: …it was intentionally removed in #191.

I've played around with my configurations and simply deferring the loading of the plugin (I use zplug to manage my ZSH plugins) with the defer: 2 zplug tag makes auto-completion working again. This way the zsh-users/zsh-completions plugin gets loaded before which provides the “native“ cd auto-completion. So in the end this is the way how my configuration line for enhancd looks like:

zplug "b4b4r07/enhancd", use:init.sh, defer:2
felipesere commented 1 year ago

@svengreb could you share you dotfiles? I've been trying to get cd completion back to work but just defering does not work for me? Do you have zsh-users/zsh-completions installed via zplug or via your package manager such as homebrew?

cocoonkid commented 1 year ago

Same issue here. Tried to defer with

zinit ice wait"2"
zinit light b4b4r07/enhancd

but no dice.

cocoonkid commented 1 year ago

@b4b4r07 I hope you're doing great and apology for directly pinging you but your comment would be highly appreciated.

blaenk commented 1 year ago

I'm also experiencing this. I hadn't updated enhancd in probably years and did so today and found that this is broken. Happy to help troubleshoot this.

soya-miyoshi commented 1 year ago

@b4b4r07 Thank you for your great tool that significantly improves my terminal experience!

I also encountered the same issue. Although I don't understand the cause of why we get - when tab completion is not set in zsh, I've found a workaround. Install changyuheng/zsh-interactive-cd (as suggested in #191). Below, I've pasted my git log output for both enhancd and zsh-interactive-cd, which work fine in my local environment.

 soya-miyoshi$ ~/.local/share/zinit/plugins/b4b4r07---enhancd (master %=)
$ git log
commit 230695f8da8463b18121f58d748851a67be19a00 (HEAD -> master, origin/master, origin/HEAD)
Author: Tim Feeley <tim@timfeeley.com>
Date:   Wed Jun 28 18:16:33 2023 -0700

    Update README.md to fix typo in FZF_CTRL_T_COMMAND (#213)
 soya-miyoshi$ ~/.local/share/zinit/plugins/changyuheng---zsh-interactive-cd (master %=)
$ git log
commit e7d4802aa526ec069dafec6709549f4344ce9d4a (HEAD -> master, origin/master, origin/HEAD)
Merge: 7bbe02e 0b97cf5
Author: Johann Chang <mr.changyuheng@gmail.com>
Date:   Tue Jul 26 10:41:26 2022 +0800

    Merge pull request #19 from brendanfalk/fig

    Add Fig as an installation method

And my zinit,

zinit ice wait lucid blockf
zinit light changyuheng/zsh-interactive-cd

zinit ice wait lucid blockf
zinit light 'b4b4r07/enhancd'