marlonrichert / zsh-autocomplete

🤖 Real-time type-ahead completion for Zsh. Asynchronous find-as-you-type autocompletion.
MIT License
5.38k stars 148 forks source link

"command not found" errors on _autocomplete #184

Closed GitUser0080 closed 3 years ago

GitUser0080 commented 3 years ago
$ 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.
% # any selection causes errors

This issue occurs to me even without any config files. Every time I want to select an item from the list it returns a "command not found" errors. Also pressing KeyUp and KeyDown to look through the history returns the same errors. Screenshot:

2021-02-09_11-38

Here's my actual .zshrc just in case: Link

marlonrichert commented 3 years ago

I cannot reproduce this and since it occurs for you without config files, too, I suspect it's something else in your environment. The problem might be that you have some faulty completion functions installed. Please check issues #156, #150, and #73. In particular, incorrectly configured kubectl completions have been know to cause problems. See those issues for more info.

GitUser0080 commented 3 years ago

It's most likely not the case here since I don't have kubectl installed at all. Is there any possibility that plugins installed with Vim and Tmux could affect the environment autocompletion and therefore break this plugin?

GitUser0080 commented 3 years ago

After playing around for a while the solution appeared to be much simpler than I thought. Sourcing the zsh-autocomplete.plugin.zsh file couldn't actually initialize the plugin properly. For some reason it didn't load the whole script, so I had to manually do zsh zsh-autocomplete.plugin.zsh for this to work.
I still don't know what caused this issue though.

marlonrichert commented 3 years ago

Sourcing the zsh-autocomplete.plugin.zsh file couldn't actually initialize the plugin properly. For some reason it didn't load the whole script, so I had to manually do zsh zsh-autocomplete.plugin.zsh for this to work.

That is quite weird. 🤔