-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
git-info ahead/behind check broken #566
Comments
What's your Zsh version? |
zsh 5.0.2 |
If you install the latest Zsh from Homebrew, does it still occur? |
Installed zsh 5.0.5, which is the version present on brew. Still broken. |
I'm sorry, but I can't replicate this. It works on my end. |
Is there anything else I can do to help test and figure this out? Prezto is really critical to my workflow. Since this is a fresh install of OS X Mavericks on a new machine, I'd expect this to affect more users over time as they upgrade their OS and/or machine. Let's get to the bottom of this. :-) |
If you can share the code, zip up your repository as is on your machine and let me download it. |
Just recloned your repo, same problem. Do you still want a zip? |
No. What happens if you change |
Doesn't help, because ahead is set to |
It's documented in What about |
If you have an IRC client, #zsh on Freenode may be of help as well. |
The culprit turned out to be a virtualenv postactivate script which modified IFS and didn't unset it when finished. |
Hey @pikeas could you be more specific what your problem was (if you remember)? What is IFS and how did you figure it out? I'm having the same problem, even with the newest zsh and prezto, after it was working for a long time, haven't a clue what changed. :( |
IFS is the separator character - https://en.wikipedia.org/wiki/Internal_field_separator |
@pikeas can you write a patch for the issue, or post where the error is and how to solve it ? Thanks a lot ! |
@Po-Hsuan-Huang Check to see if other software (in my case it was a Python virtualenv postactivate script) sets the |
Yes. For me it was the conda env manager not unsetting the IFS, which is fixed now. |
I'm setting up a new Mac, so everything is up-to-date - latest OS X Mavericks, latest clone of prezto, etc. Git version is 1.8.3.4.
Symptom: After every shell command, the following is output:
I did some digging in that file (
modules/git/functions/git-info
). From line 250 (not either of the lines from the error, interestingly), we have:$ahead is set to
(num)(some sort of whitespace)(num)
, which means the[(w)1]
has failed to split the string, which then causes the comparison to zero to throw an error.My shell-fu is not strong, so I don't know how to correctly split
$ahead_or_behind
.The text was updated successfully, but these errors were encountered: