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

command not found: .autocomplete.key #187

Closed
BeforeFlight opened this issue Feb 14, 2021 · 11 comments
Closed

command not found: .autocomplete.key #187

BeforeFlight opened this issue Feb 14, 2021 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@BeforeFlight
Copy link

BeforeFlight commented Feb 14, 2021

  • zsh-autocomplete version: c4dea766566b168a32dbfa8d10335e525ce39fcc
  • Zsh version: ubuntu/5.8-5
  • Framework: Oh My Zsh
  • Plugin manager: zplug

After this commit: 6529dfa49bdc1cc0098ec4bfa16b0d5497a93d25 (Refactor precmd hooks)
Just on loading zsh getting this:

.autocomplete.key-binding.precmd:2: command not found: .autocomplete.key
"complete-word" undefined-key
"complete-word" undefined-key
@BeforeFlight BeforeFlight added the bug Something isn't working label Feb 14, 2021
@marlonrichert
Copy link
Owner

marlonrichert commented Feb 14, 2021

I am unable to reproduce this.

Do you get the same problem when you do the following?

$ cd $(mktemp -d)  # Create a temp dir and enter it.
$ ZDOTDIR=$PWD HOME=$PWD zsh -f  # Start a subshell in it without config files.
% source path/to/zsh-autocomplete.plugin.zsh  # Source the plugin.

If not, then

  • A) there is something else in your .zshrc file that's interfering or
  • B) there is a caching problem.

The latter can be fixed by deleting $_comp_dumpfile.

@BeforeFlight
Copy link
Author

BeforeFlight commented Feb 14, 2021

I've reduced the .zshrc to minimum, and also tried to remove $_comp_dumpfile, as suggested.
Same error if use zplug manager but if clone/source zsh-autocomplete manually - no errors.

So it happens to be following inconsistency:

  • Installation of your plugin requres 3) Remove any calls to compinit from your ~/.zshrc file
  • But at the same time zplug runs compinit on its loading (it can be shown when load it with zplug load --verbose option in .zshrc)

@BeforeFlight
Copy link
Author

But it seems to work fine (at first sight) when sourcing zsh-autocomplete manually (before source ~/.zplug/init.zsh), while left other plugins managed by zplug. So switched to this for now.

marlonrichert added a commit that referenced this issue Feb 18, 2021
@marlonrichert
Copy link
Owner

Fixed.

@BeforeFlight
Copy link
Author

Confirm. No previous errors shown.

@marlonrichert marlonrichert changed the title BUG: command not found: .autocomplete.key command not found: .autocomplete.key Feb 20, 2021
@flexagoon
Copy link

flexagoon commented Jun 7, 2021

It happened to me. I am also using Zinit plugin manager, but my error text is slightly longer:

.autocomplete.key-binding.precmd:3: .autocomplete.key: function definition file not found
"complete-word" undefined-key
"complete-word" undefined-key
"complete-word" undefined-key
"complete-word" undefined-key
"accept-line" undefined-key
"send-break" undefined-key

Edit: looks like it's an issue with NixOS, because it adds its own compinit call. Manually sourcing zsh-autocomplete in packages.zsh.initExtraBeforeCompInit section in home.nix works.

@marlonrichert
Copy link
Owner

This appears to be a regression introduced by 68bae95.

@marlonrichert marlonrichert reopened this Jun 7, 2021
@marlonrichert marlonrichert self-assigned this Jun 7, 2021
marlonrichert added a commit that referenced this issue Jun 7, 2021
@marlonrichert
Copy link
Owner

Should be fixed now.

@flexagoon
Copy link

Doesn't help. Here's my .zsh config:
https://dpaste.com/5ETLF2F3X

@flexagoon
Copy link

Oh wait, nvm, I just forgot to run zplug update. Thanks!

@marlonrichert
Copy link
Owner

If you use my software on a regular basis, please consider sponsoring me. 🙂

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants