ZSH powerlevel10k shell bug when showing git branch name

Hi,

I encountered this bug and was able to solve the issue.

modify and edit (sudo) p10k.zsh file

sudo nano /usr/share/zsh/p10k.zsh 

then find this lines of code in the file:

# If local branch name or tag is at most 32 characters long, show it in full.
# Otherwise show the first 12 … the last 12.
# Tip: To always show local branch name in full without truncation, delete the next line.
(( $#where > 32 )) && where[13,-13]="…"
res+="${clean}${where//\%/%%}"  # escape %

next is you add a little space at the end of the res variable.

res+="${clean}${where//\%/%%} "  # escape %

and voila!

image

Thank me later

1 Like