Repository: sindresorhus/pure

Issue #455: git info eventually stops being updated
Created: 2018-12-20T10:37:59Z
General information

Pure version: master (commit c985b19)
ZSH version: 5.6.2
Terminal program & version: iTerm 3.2.6
Operating system: macOS 10.14.2
ZSH framework: antibody

I have:

 Tested with another terminal program and can reproduce the issue: 
 Followed the Integration instructions for my framework

Problem description
When I'm using a terminal panel for some time (hours or days), changing branches and etc, eventually, git info stops updating... it shows the old branch, for example, branch1, even though I keep changing branches. The arrows indicating push/pull also are not shown.
If I open another terminal panel/tab on the same folder, everything works as expected.
Reproduction steps
Don't know... :/
My .zshrc:
Not sure what's needed because I'm not sure what's causing it, but, pure-related, here it is:
PURE_CMD_MAX_EXEC_TIME=1
PURE_PROMPT_SYMBOL="λ"

source /Users/carlos/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-mafredri-SLASH-zsh-async/async.plugin.zsh
fpath+=( /Users/carlos/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-mafredri-SLASH-zsh-async )
source /Users/carlos/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-sindresorhus-SLASH-pure/pure.plugin.zsh
fpath+=( /Users/carlos/Library/Caches/antibody/https-COLON--SLASH--SLASH-github.com-SLASH-sindresorhus-SLASH-pure )




IssueHunt Summary

 mafredri has been rewarded.
Backers (Total: $80.00)

 issuehunt ($80.00)

Submitted pull Requests

#543 Respawn Pure async worker on crash


Tips

Checkout the Issuehunt explorer to discover more funded issues.
Need some help from other developers? Add your repositories on IssueHunt to raise funds.

Duplicate issue #536: git branch name gets out of sync
Created: 2020-03-04T17:37:42Z
General information
System report (output of prompt_pure_system_report):

Zsh: zsh 5.8 (x86_64-apple-darwin19.3.0)
Operating system: Mac OS X 10.15.3 (19D76)
Terminal program: Apple_Terminal (433)
Git: git version 2.25.0
Pure state:

username: ''
prompt: ❯
version: 1.10.3


Virtualenv: export VIRTUAL_ENV_DISABLE_PROMPT=12
Prompt: typeset -g PROMPT=$'%F{${prompt_pure_colors[path]}}%~%f %F{242}${prompt_pure_vcs_info[branch]}%F{218}${prompt_pure_git_dirty}%f %F{$prompt_pure_colors[git:arrow]}${prompt_pure_git_arrows}%f %{ %}%(12V.%F{$prompt_pure_colors[virtualenv]}%12v%f .)%(?.%F{$prompt_pure_colors[prompt:success]}.%F{$prompt_pure_colors[prompt:error]})${prompt_pure_state[prompt]}%f '
Detected frameworks: Oh My Zsh

Oh My Zsh:

Plugins: git, history-substring-search





I have:

 Tested with another terminal program and can reproduce the issue: 
 Followed the integration instructions for my framework

Problem description
When using my terminal normally, I find that the git branch name gets out of sync with git's actual branch.  For example right now
~/repo jlebar/l10n ⇣⇡
❯ git branch | cat
  jlebar/l10n
* master

Once this happens it seems "stuck" -- I can't seem to get it to refresh again by e.g. checking out other branches.
Reproduction steps
I haven't been able to reproduce this on demand, but it happens at least once a day.
My .zshrc:
I don't have a minimal zshrc because it takes a while of using my computer normally to reproduce the issue.  Here's my whole zshrc; hopefully nothing too surprising in here.
# Path to your oh-my-zsh installation.
export ZSH="/Users/jlebar/.oh-my-zsh"
ZSH_THEME=""  # using pure, below
plugins=(git history-substring-search)
source $ZSH/oh-my-zsh.sh
autoload -U promptinit; promptinit
prompt pure

export CONFDIR="$HOME/code/conf"
path+=($CONFDIR/bin)
export PATH

# Add GNU utilities to path.  I know you're not supposed to do this,
# but...yeah.  I have the `nognu` script that lets me run code without this.
# From https://apple.stackexchange.com/questions/103228/homebrew-easy-way-to-add-gnubin-to-path-for-multiple-packages
if type brew &>/dev/null; then
  HOMEBREW_PREFIX=$(brew --prefix)
  # gnubin; gnuman
  for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnubin; do export PATH=$d:$PATH; done
  # I actually like that man grep gives the BSD grep man page
  for d in ${HOMEBREW_PREFIX}/opt/*/libexec/gnuman; do export MANPATH=$d:$MANPATH; done
fi

alias ls='ls --color=auto'
export EDITOR="vim"

###### vi-mode ######
# The "pure" prompt says not to enable oh-my-zsh vi-mode plugin for whatever reason.

bindkey -v

# allow v to edit the command line (standard behaviour)
autoload -Uz edit-command-line
zle -N edit-command-line
bindkey -M vicmd 'v' edit-command-line

# allow ctrl-p, ctrl-n for navigate history (standard behaviour)
bindkey '^P' up-history
bindkey '^N' down-history

# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour)
bindkey '^?' backward-delete-char
bindkey '^h' backward-delete-char
bindkey '^w' backward-kill-word

# allow ctrl-r and ctrl-s to search the history
bindkey '^r' history-incremental-search-backward
bindkey '^s' history-incremental-search-forward

###### vi-mode ######

Closing comment (2020-03-06T18:07:53Z): Duplicate of #455