ohmyzsh: Git plugin freaks out when there's a conflict
I did a git rebase master which resulted in a conflict. And now every time I hit enter at the zsh prompt, I get this:
VCS_INFO_get_data_git:223: no such file or directory: .git/rebase-apply/msg-clean
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 35 (17 by maintainers)
Commits related to this issue
- Use ZSH 5.2+ https://github.com/robbyrussell/oh-my-zsh/issues/4932 — committed to gabebw/dotfiles by gabebw 8 years ago
TL;DR: Homebrew zsh 5.2 has the fix; it’s your
chshand not your$PATHthat probably matters.I can reproduce this on my OS X 10.11.6 machine, but only with the system-supplied zsh 5.0.8. I have an updated Homebrew-installed zsh 5.2, and it is not affected. So it looks like the Homebrew version includes the fix. To be affected, you also need to be using a theme that uses zsh’s supplied
vcs_infoinstead of OMZ’s own git theming support, such as thepuretheme.There’s a possible interaction with Homebrew, insofar as you may not be running the Homebrew-installed
zshin new terminal sessions, regardless of whatwhich zshgives you inside a session. This means thatzsh --versionis not necessarily the one you’re running. The firstzshin a new terminal session is controlled by yourchshsetting. Useecho $ZSH_VERSIONto see what version the current session is running.For example, I’m on OS X 10.11.6, and I have
zsh5.2 installed via Homebrew. But I still get the systemzsh5.0.8 by default, since I have/bin/zshas my default shell.If that’s your issue, and you want to use the newer 5.2 zsh by default, do a
chsh -s $(homebrew --prefix)/bin/zsh(after making sure it’s in your/etc/shellsfile). @WayneYe, I suspect this is your situation, since you mentioned updating/etc/shellsbut not running achsh. I’d guess this is true for others here, since you’re checking the version withzsh --versionand not$ZSH_VERSION.Or, your terminal emulator might be set up to run a specific
zshas your login shell, and it could be pointing to/bin/zshinstead of/usr/local/bin/zsh. If that’s the case, I’d just switch your terminal profile to using your default login shell, so it respects yourchshsettings.And thank you Marc!
Installing the latest zsh (
zsh 5.2 (x86_64-apple-darwin15.4.0)) did not fix the error for me.Ok everyone please check you’re running 5.2 with
echo $ZSH_VERSION. If it’s not, runchsh -s /usr/local/bin/zsh.Just a little feedback from my problem.
I didn’t have
echo $ZSH_VERSION5.2 instead I had5.0. I installed the latest version from Brew but I had to add/usr/local/bin/zshto/etc/shellsand then everything was working fine.+1
+1 for @jtheoof
Issue still exist for sure!
I installed latest zsh 5.2 and updated my /etc/shells, i am using OSX El Capitan v10.11.6, below is my environment:
What I got:
On Linux Mint/Ubuntu U got:
Is there a PPA with ZSH for ubuntu to upgrade to
5.2?Relevant parts of my
$PATHis/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin, so I should be good (onlynvmandrvmbefore it)This is a bug in zsh’s codebase, fixed in https://github.com/zsh-users/zsh/commit/7a1678767f44f200295d88dfea94902718275266. If you can, update your zsh to 5.2.