ohmyzsh: Suddenly OMZ gives compdef: command not found
Discussed in https://github.com/ohmyzsh/ohmyzsh/discussions/10701
<div type='discussions-op-text'>Originally posted by konsbn February 17, 2022 Out of nowhere I am being greeted with this message as I fire up a new terminal. I haven’t done anything with my .zshrc or the config files.
/home/sbn/.oh-my-zsh/lib/completion.zsh:78: bashcompinit: function definition file not found
zsh: compdef: command not found...
/home/sbn/.oh-my-zsh/lib/termsupport.zsh:108: add-zsh-hook: function definition file not found
/home/sbn/.oh-my-zsh/lib/termsupport.zsh:109: add-zsh-hook: function definition file not found
/home/sbn/.oh-my-zsh/lib/theme-and-appearance.zsh:2: colors: function definition file not found
/home/sbn/.oh-my-zsh/lib/vcs_info.zsh:3: is-at-least: function definition file not found
/home/sbn/.oh-my-zsh/lib/vcs_info.zsh:3: is-at-least: function definition file not found
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
/home/sbn/.oh-my-zsh/plugins/git/git.plugin.zsh:140: is-at-least: function definition file not found
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
zsh: compdef: command not found...
/home/sbn/.oh-my-zsh/plugins/git/git.plugin.zsh:282: is-at-least: function definition file not found
/home/sbn/.oh-my-zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh:59: is-at-least: function definition file not found
zsh-syntax-highlighting: Failed to load add-zsh-hook. Some speed optimizations will not be used.
zsh-syntax-highlighting: failed loading add-zsh-hook.
/home/sbn/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh:742: add-zsh-hook: function definition file not found
zsh: compdef: command not found...
Please help me resolve this issue</div>
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 1
- Comments: 19 (10 by maintainers)
“I didn’t try to reboot and I believe that ohmyzsh updates shouldn’t require reboots,”
omz doesn’t require a reboot, however, your system updated ZSH and apparently did so in a way that breaks current running zsh sessions.
I had the same problem on Fedora 35 Workstation, after updating Zsh from 5.8 to 5.8.1. The
FPATHvariable was pointing to/usr/share/zsh/5.8/functionsinstead of/usr/share/zsh/5.8.1/functions.Rebooting the system solved the problem (a logout wasn’t enough, not sure why).
Same as https://github.com/ohmyzsh/ohmyzsh/issues/10697. Have you updated from 5.8 to 5.8.1? If so, can you post the output of
typeset -p fpath?