I'm using a Mac (Catalina), iTerm2, Oh My Zsh (https://ohmyz.sh/), and the p10k zsh theme (https://github.com/romkatv/powerlevel10k).
Currently my git branches are showing truncated names on iTerm2 (like davidb/my-kewl...branch
) instead of the untruncted branch names, like:davidb/my-kewl-feature-branch
How do I turn off git branch name truncating? I want the untruncated git branch names.
Per https://github.com/romkatv/powerlevel10k/issues/193, I'm unsure how to use the code below in my ~/.p10k.zs
file to turn off git branch name truncating. I've already tried many combinations, including Google searches, and nothing worked.
POWERLEVEL9K_VCS_SHORTEN_MIN_LENGTH=32
POWERLEVEL9K_VCS_SHORTEN_LENGTH=12
POWERLEVEL9K_VCS_SHORTEN_STRATEGY=truncate_middle
As of Februray 2021, the line to delete is 389
(( $#branch > 32 )) && branch[13,-13]="…" # <-- this line
I got the answer from the p10k zsh theme (https://github.com/romkatv/powerlevel10k) creator Roman on Gitter: https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge
In ~/.pk10.zsh
or ~/.p10k.zsh
delete, or comment out, line 375 as shown in this Github repo file:
https://github.com/romkatv/powerlevel10k/blob/459af1f2382ff53214bf9e4fc598b4e36fb8f8df/config/p10k-lean.zsh#L374
Line to Comment Out or Delete in Repo Link Above
(( $#where > 32 )) && where[13,-13]="…"
Thanks Roman!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With