Closed srappan closed 4 years ago
You have a lot plugins installed. Can you please disable them one by one to see which one it is that conflicts with zsh-autocomplete
? Then I can investigate the conflict and fix it.
Disabled everything except fzf
, zsh-syntax-highlighting
, zsh-autosuggestions
, zsh-autocomplete
. Still the same error.
❯ source ~/.zshrc
_autocomplete.add-zsh-hook:1: job table full or recursion limit exceeded
~ d_main_complete:208: command not found: 1936 ✔ 13:25:47
_main_complete:208: command not found: 1936
_main_complete:208: command not found: 1936
_main_complete:208: command not found: 485
_main_complete:208: command not found: 485
_main_complete:208: command not found: 485
_main_complete:208: command not found: ''
_main_complete:208: command not found: ''
_main_complete:208: command not found: ''
d
@srappan You must still have some other customization enabled, because I just did a clean install of OMZ + fzf
, zsh-syntax-highlighting
, zsh-autosuggestions
and zsh-autocomplete
, and it worked fine.
I have powerlevel10k installed too, the error only occurs after sourcing the .zshrc
Wait, why are you sourcing your .zshrc
file? That file already gets sourced automatically when your shell starts up.
To reload .zshrc when I make a change to the file
OK, thanks. I'll see if I can somehow make sure that zsh-autosuggest
doesn't run again when you re-source your .zshrc
file, because that's what's happening now.
It is generally not a good idea to source your .zshrc during your session to reload your config as errors such as the one you’re running into tend to occur. Many plugins do not account for loading twice in the same session which is why you may see issues after sourcing. It is normally recommended to restart you session to apply changes such as running exec zsh
Getting a similar (on the user end anyway) error:
# ~/.zshrc, nothing installed except zinit
zinit light marlonrichert/zsh-autocomplete
% source ~/.zshrc
_autocomplete.add-zsh-hook:4: cannot duplicate fd 1: too many open files
Many plugins do not account for loading twice in the same session which is why you may see issues after sourcing. It is normally recommended to restart you session to apply changes such as running
exec zsh
I've never had trouble with other plugins, or heard this recommendation. Which isn't to say there aren't other plugins that have this bug or that no one uses exec zsh
but I do think it's reasonable for a user to expect to be able to source the shell rc
@olets And that's why I'm keeping this issue open until I've fixed it. 🙂 But it's going to take time. zsh-autocomplete
is a fairly complex plugin. It's not immediately obvious how to solve this.
I've never had with other plugins, or heard this recommendation.
@olets I'm not the only one who says so: https://github.com/romkatv/powerlevel10k/blob/master/README.md#weird-things-happen-after-typing-source-zshrc
It's almost always a bad idea to run source
~/.zshrc
, whether you are using Powerlevel10k or not. This command may result in random errors, misbehaving code and progressive slowdown of Zsh.If you've made changes to
~/.zshrc
or to files sourced by it, restart Zsh to apply them. The most reliable way to do this is to type exit and then start a new Zsh session. You can also useexec zsh
. While not exactly equivalent to complete Zsh restart, this command is much more reliable thansource ~/.zshrc
.
Available now on master
.
This occurs whenever I source my ~/.zshrc with this plugin
My .zshrc