Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tab completion not working #206

Open
chevdor opened this issue Apr 12, 2023 · 9 comments
Open

tab completion not working #206

chevdor opened this issue Apr 12, 2023 · 9 comments
Labels
area/bash Catch all for changes in bash files area/zsh Catch all for changes in zsh files

Comments

@chevdor
Copy link

chevdor commented Apr 12, 2023

What did you expect to happen?

cd <tab> should work

What actually happened?

cd <tab> does not trigger expansion/autocompletion.

Output

  • cd <TAB> shows a -
  • cd M<TAB> (should suggest some hits like Movies, Music, etc...) shows nothing

Additional context

  • I am using zsh
  • other commands, such as ls do expand fine with tab
  • \cd does expand fine with tab
  • cd is aliased to cd=__enhancd::cd
  • unalias cd "fixes" the issue but well.. that's not the idea :)

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
Copy link

ghost commented Apr 16, 2023

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

@svengreb
Copy link

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
Copy link

GotoRen commented May 19, 2023

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

  • OS: macOS Ventura version 13.4
  • ZSH: zsh 5.9 (x86_64-apple-darwin22.0)

@svengreb
Copy link

svengreb commented May 20, 2023

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
Copy link

@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
Copy link

Same issue here. Tried to defer with

zinit ice wait"2"
zinit light b4b4r07/enhancd

but no dice.

@cocoonkid
Copy link

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

@babarot babarot added area/bash Catch all for changes in bash files area/zsh Catch all for changes in zsh files labels May 30, 2023
@blaenk
Copy link

blaenk commented Aug 3, 2023

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
Copy link

soya-miyoshi commented Aug 14, 2023

@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'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/bash Catch all for changes in bash files area/zsh Catch all for changes in zsh files
Projects
None yet
Development

No branches or pull requests

8 participants