-
Notifications
You must be signed in to change notification settings - Fork 512
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
VCS info not updating #52
Comments
quick edit running the vcsinfo script via bash -x gives the correct output for whichever directory I'm in. I use zsh with robbyrussel's oh-my-zsh I do have bash >4.2 installed and added the PS1 line in the README to the bashrc |
I don't use zsh my self but I guess it does not read ~/.bashrc by default. Try putting that stuff in your ~/.zshrc. Does that work? |
The thing is I have an extremely modified prompt already in Zsh - I'm not sure how adding that to the zshrc may affect it. I did try changing shell to bash to see if that was simply the issue but I still get the same problem. - I don't think the PS ! line is the issue. I have also tried in different terminal emulators (I use urxvt as my main one) and again I have the same problem. |
Well give it a try. That line should preserve the existing changes so put it after the oh-my-zsh stuff how ever that works. I use urxvt as well. Try it in a clean environment with no bashrc (except the line needed for VCS stuff). |
I use zsh 5.0 and the following correctly added the vcs info to the prompt:
If you add this to the very bottom of your rc-file, it should have no negative affect on your prompt. Using |
Did you get it to work @ajpaulson? |
I've been under some tight deadlines at work so I've not had a chance to test yet - I will update once I've tested. |
@erikw I had exactly the same issue and I can confirm that @scicalculator's suggestion fixed it for me. Maybe clarify the |
I believe zsh recognizes PS1 as well. But I don't know if PROMPT and PS1 refers to the same variable. Does it work to put the PS1-line from the README in the |
Yup. Would be useful to add to the |
I just cygwin'd zsh and PROMPT seems to be the same thing as PS1. Can you verify that what solves this issue is to use the same line as in the README but appending it to |
I can confirm that for me (zsh 5.0) the line as copied from the README works unmodified. The same should also be true for most versions of zsh 4.x (hopefully no one is on earlier versions, for their sake). @Olliea95 I suspect that you had accidentally put the line too early and then re-wrote PS1 afterwards. It is certainly convenient to put this line at the very bottom, but if you compartmentalize your rc-file then you could put all prompt customization together with this line near-or-at the bottom of that section. This will work
This will fail
|
Alright a3fa89c and I mark this as solved :-) |
Running in Debian.
If I start tmux from within a git/hg/svn repo it shows the vcs info and if I switch branches in that repo it updates...
But if I change directory it still displays the vcs info for the directory I was in before starting tmux and if I started from a non-version controlled directory it never shows up.
The text was updated successfully, but these errors were encountered: