-
Notifications
You must be signed in to change notification settings - Fork 395
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
ZSH git prompt not detecting git changes #55
Comments
Fixed by defining a
|
You can also fix it by using single quotes, so the variables and commands in PROMPT don't get evaluated when sourcing .zshrc. See here: http://unix.stackexchange.com/questions/14266/how-do-you-make-rprompt-in-zsh-update-itself-on-every-enter |
@cevaris That actually seems to have worked. I'll test the rest of today and see if there are any bugs or situations where it doesn't work. Thanks! |
👍 |
@klaasb Changing to single quotes works for me. Thanks! |
+1 for single quote fix |
this is because using single quotes in a variable assignment delays evaluation, therefore we will update the git status at every update, not only at the sourcing time of the .zshrc! (Kinda, something like that, see: olivierverdier/zsh-git-prompt#55)
Just a note that this single quote thing is valid for all files in the This gave me a hard time after having copied over code from my The following will cause issues ## Recursively delete `.DS_Store` files
alias cleanup="find . -type f -name '*.DS_Store' -ls -delete"
## Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill="ps ux | grep '[C]hrome Helper --type=renderer' | grep -v extension-process | tr -s ' ' | cut -d ' ' -f2 | xargs kill" Had to flip the single and double arrangement: single quote outside, double quote inside ## Recursively delete `.DS_Store` files
alias cleanup='find . -type f -name "*.DS_Store" -ls -delet'
## Kill all the tabs in Chrome to free up memory
# [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description
alias chromekill='ps ux | grep "[C]hrome Helper --type=renderer" | grep -v extension-process | tr -s " " | cut -d " " -f2 | xargs kill' |
|
Also, seems that
__CURRENT_GIT_STATUS
is not auto updating as well.To reporoduce
blah
~/.zshrc
file and it picks up the new untracked fileThe text was updated successfully, but these errors were encountered: