-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
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
Suddenly OMZ gives compdef: command not found #10702
Comments
I believe compdef is defined in:
where PATH and VERSION will depend on your installation. Are those files still ok? |
Same as #10697. Have you updated from 5.8 to 5.8.1? If so, can you post the output of |
I had the same problem on Fedora 35 Workstation, after updating Zsh from 5.8 to 5.8.1. Rebooting the system solved the problem (a logout wasn't enough, not sure why). |
|
Rebooting the system solved the problem (a logout wasn't enough, not sure why). |
See #10702 (comment). Can you run |
If you followed the wrong advice on #4607 or other threads, it's likely you have a line in your .zshrc file saying |
Mine is this:
However, opening a new terminal doesn't solve the issue. I didn't try to reboot and I believe that ohmyzsh updates shouldn't require reboots, so I made a symlink as a local workaround: |
"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. |
@rwmitchell You are right, I was confused between zsh and ohmyzsh upgrades, because I saw several reports like this, and thought that it was caused by ohmyzsh update. Looks like zsh itself is the culprit |
The "workaround" is only useful until you reboot, so I don't see why you'd prefer that. If this happened because of Zsh, it'll happen again when you update to the next Zsh version. |
Thank you for the sponsorship by the way! |
Yes, I did it exactly because I don't want to reboot :) |
I get |
Or maybe just don’t install in /usr Not to be flip, corporate lockdown policies are worse than Apple's. Installing non-apple programs in $HOME/local is a reasonable workaround. It also has the advantage of getting backed up with your HOME and makes it easy to keep OS updates separate from your own. |
You mean copy |
No. I was assuming you were installing zsh by compiling from source and could therefore use:
but now you're talking about copy files from /usr/share into /usr/local/share...how did you get files in /usr/share to begin with if you can't create files there now? If you're using Apple's installation, it should already be using 'its' latest version without needing to create a symlink to it. |
The default shell on Mac Monterey is zsh and the default zsh folder besides /bin/zsh is /usr/share. So I take your point, and try to uninstall zsh or change the system zsh dir. A google search with |
sudo ln -s /usr/share/zsh/5.8.1 /usr/share/zsh/5.8 |
Discussed in https://github.com/ohmyzsh/ohmyzsh/discussions/10701
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.
Please help me resolve this issue
The text was updated successfully, but these errors were encountered: