Zsh-autocomplete: How does fzf completion work now?

Created on 31 Oct 2020  ·  7Comments  ·  Source: marlonrichert/zsh-autocomplete

Environment

  • Zsh version: zsh 5.8 (x86_64-pc-linux-gnu)
  • zsh-autocomplete: 85e23dbf6e3a2e34ff91969f0bb3f99b21e80e97

Does the bug occur without config files?

  • [x] Yes
  • [ ] No

Steps to reproduce

  1. Open clean zsh zsh -fd
  2. Source fzf installed as package source /usr/share/fzf/completion.zsh
  3. Get fzf completion successfully, e.g. for cd **<Tab>
  4. Source autocomplete plugin (here installed via zinit) source ~/.cache/zinit/plugins/marlonrichert---zsh-autocomplete/zsh-autocomplete.plugin.zsh
  5. Set fzf tab option zstyle ':autocomplete:tab:*' fzf-completion yes
  6. Try again fzf completion as in step 3

Expected behavior

According to the documentation I would expect that step 6 works as in step 3.

Actual behavior

Nothing happens, shell blocks, completions times out (as it reports).

Bug report

All 7 comments

It's not possible to change zstyle ':autocomplete:tab:*' fzf-completion at runtime. I've emphasized that now in the Readme.

Okay so new attempt:

$ cd $(mktemp --directory)
$ vim .zshrc
$ # see below snippet for zshrc content
$ ZDOTDIR=$PWD HOME=$PWD zsh -d
> cd /etc/** # Press <TAB> here
> # nothings happens, shell blocks, completion timeout

/tmp/tmp.i4rxmUqHWH/.zshrc:

source /usr/share/fzf/completion.zsh
zstyle ':autocomplete:tab:*' fzf-completion yes
source /home/vagrant/.cache/zinit/plugins/marlonrichert---zsh-autocomplete/zsh-autocomplete.plugin.zsh

Note that if I only source fzf here. It works again as intended.
So why does this setup not work? Isn't this defined in the zshrc? It should be available when your plugin gets loaded and does it setup.
I tested it like this already before in my more complex setup ofc. The runtime configuration was only for the issue. Sorry that I wasted your time. :see_no_evil:

I tried again with your new steps above, but it works fine for me. 🤷🏽‍♂️

@weilbith I pushed in some changes I had locally. Perhaps they made a difference. Can you git pull and try again?

Okay that is awkward. I thought this setup should eliminate most factors of a not equal setup. I'm mobil now, but I try to reproduce this issue in a Docker container. If the problem remains I'll construct a Dockerfile for you. So that we are both in a complete independent environment. Something must be different....

@weilbith I pushed in some changes I had locally. Perhaps they made a difference. Can you git pull and try again?

Sorry, just saw your comment after posting mine (did not updated the page). I'll check this out when I'm on a PC again. :+1:

Yes it works now after the update! Thank you so much. :tada:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

romzie picture romzie  ·  7Comments

g4cm4n picture g4cm4n  ·  6Comments

daxmc99 picture daxmc99  ·  3Comments

cenk1cenk2 picture cenk1cenk2  ·  3Comments

PSalant726 picture PSalant726  ·  8Comments