Description of problem: When using autocomplete, $ git checkout [TAB] (eval):1: _git: function definition file not found _main_complete:208: _ignored: function definition file not found _main_complete:208: _approximate: function definition file not found Version-Release number of selected component (if applicable): 5.8.1 How reproducible: Always. Steps to Reproduce: 1. Update zsh to 5.8.1 2. On a console, type a command (eg ls or git) and press tab. Actual results: An error is shown. Expected results: Arguments are autocompleted or suggested. Additional info: Opening zsh shows and error that compinit cannot be loaded. FPATH does not include /usr/lib64/zsh/5.8.1/functions. Adding it manually still gives an error when attempting to autocomplete: $ ls / _arguments:325: failed to load module `zsh/computil': /usr/lib64/zsh/5.8/zsh/computil.so: cannot open shared object file: No such file or directory
Are you sure you restarted zsh after the update? Even typing "exec zsh" is sufficient. This has always been necessary every time zsh updates to a new version. I just updated a machine and I get the same behavior on a running shell but not on a new shell or after running "exec zsh".
Yes, I tried. I just tested again, and this is what I get: $ exec zsh /home/sergio/.zshrc:20: compinit: function definition file not found
This is what I get here: $ exec zsh /home/pingou/.zshrc:11: compinit: function definition file not found /home/pingou/.zshrc:12: promptinit: function definition file not found /home/pingou/.zshrc:13: bashcompinit: function definition file not found precmd:8: vcs_info: function definition file not found
The problem seems to be a wrong path in $fpath: echo $fpath /usr/share/Modules/init/zsh-functions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh/5.8/functions The directory "/usr/share/zsh/5.8/functions" does not exist anymore since the upgrade, the correct directory would have to be "/usr/share/zsh/5.8.1/functions". It can be temporarily fixed by putting the following into your .zshrc fpath=($fpath /usr/share/zsh/5.8.1/functions)
Looking at the spec file, it seems that the installation process is correct: https://src.fedoraproject.org/rpms/zsh/blob/rawhide/f/zsh.spec#_105 So it seems to be an issue of how ZSH_VERSION gets compiled into fpath.
I guess this was caused by updating the zsh package from 5.8 to 5.8.1 while zsh was running. The following command (or opening a new session) should fix it: $ exec zsh -l We normally do not rebase zsh in stable releases of Fedora, so troubles like this do not happen. This time I preferred a rebase over backport to make it more obvious that Fedora is no longer affected by CVE-2021-45444. Sorry for the inconveniences!
Doesn't work for me: $ exec zsh -l /home/pingou/zshrc:11: compinit: function definition file not found /home/pingou/.zshrc:12: promptinit: function definition file not found /home/pingou/.zshrc:13: bashcompinit: function definition file not found precmd:8: vcs_info: function definition file not found I does work if I add the work around Daniel mentioned in comment #4.
I guess you would have to restart your session like Kamil said (comment #6). If that doesn't work, try to reboot to make sure your entire session was restarted. It does work here after restarting my session (and making sure no lingering processes like e.g. gnome-terminal-server are still around): $ echo $fpath /usr/share/Modules/init/zsh-functions /usr/local/share/zsh/site-functions /usr/share/zsh/site-functions /usr/share/zsh/5.8.1/functions
Confirmed that restarting fixes the issue for me.
(In reply to Pierre-YvesChibon from comment #7) > Doesn't work for me: > > $ exec zsh -l > /home/pingou/zshrc:11: compinit: function definition file not found > /home/pingou/.zshrc:12: promptinit: function definition file not found > /home/pingou/.zshrc:13: bashcompinit: function definition file not found > precmd:8: vcs_info: function definition file not found > > > I does work if I add the work around Daniel mentioned in comment #4. For some reason $fpath is not updated while executing the new version of zsh. I am not able to reproduce it locally, so I have no idea how to fix it. Next time I will rather pick the security fix without changing zsh version in stable releases of Fedora. Sorry for the troubles!