Powerline does not track git branches
maciejadamski89 opened this issue · comments
I have the same issue with Python 3.8 / Powerline 2.8.2 / Zsh / tmux / NixOS.
My .tmux.conf
:
run-shell "powerline-daemon -q"
run-shell "powerline-config tmux setup"
My .zshrc
:
. $(dirname $(dirname $(readlink $(which powerline))))/lib/python3.8/site-packages/powerline/bindings/zsh/powerline.zsh
My theme:
#!/usr/bin/env zsh
# Set required options.
setopt promptsubst
# Load required modules.
autoload -U add-zsh-hook
autoload -Uz vcs_info
# Add hook for calling vcs_info before each command.
add-zsh-hook precmd vcs_info
# Set vcs_info parameters.
zstyle ':vcs_info:*' enable hg bzr git svn fossil
zstyle ':vcs_info:*:*' check-for-changes true # Can be slow on big repos.
zstyle ':vcs_info:*:*' unstagedstr "%B%{$fg[blue]%} *"
zstyle ':vcs_info:*:*' stagedstr "%B%{$fg[green]%} ✚"
zstyle ':vcs_info:*:*' actionformats "%S" "%r/%s/%b %u%c (%a)%f%{$reset_color%}"
zstyle ':vcs_info:*:*' formats "%B%c %{$fg[yellow]%}%i %{$fg[blue]%}%s:%{$fg[red]%}%b%f%{$reset_color%}"
zstyle ':vcs_info:*:*' nvcsformats "" ""
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b'
PROMPT='%{$fg_bold[green]%}%* %{$fg[blue]%}%c %{$fg_bold[red]%}➜ %f%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="git:%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%f%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}%f%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
RPROMPT='${vcs_info_msg_0_}${return_status}%f%{$reset_color%}'
The stash status works well, but even with closing konsole, and doing a cd
back into the repository, I get the first branch.
Meanwhile I wil try re-create a problem on a docker image.
It's look like this on mi side. @blackheaven please also share your screen shot.
Yeah, look exactly as my problem. I also has Python 3.8.10
. I tried disable all custom settings .bashrc
.config.fish
and it's not working nethier. Creating of new user same - doeas not fix the problem.
Actually, the deamon does track the change, disabling it fixes the segment in zsh, but vim needs to be reopened to have the branch updated.