I recently enabled Windows Subsystem for Linux 2 (WSL2) on Windows 10 and installed Debian.
I also installed zsh with several plugins. You can see the dotfiles repo here: https://github.com/art3xias23/wsl-dotfiles
I’m using Windows Terminal, however there is no difference if I use gitbash and debian on their own or inside Windows Terminal.
My issue is:
I have a repo with 3 worktrees on my windows home directory.
When I use git bash for windows I can see the branch names fine after the directory.
GitBash
ZSHELL
Now when I move to zsh and try to access the same windows home directory worktrees, I can see the branch name for only the first repo and not the second or third (The first repo contains the .git directory)
I also don’t see any other branch names, like the one for the my wsl-dotfiles repo, which is my wsl home directory
====================================
====================================
====================================
====================================
Would anyone know why the branch names are not appearing.
2
Answers
Below I'll display my findings and close this question.
Home directory branch not showing:
Commenting out this line in my.p10k.zsh solved the issue
typeset -g POWERLEVEL9K_VCS_DISABLED_WORKDIR_PATTERN='~'
Git worktree branch name not showing.
Not yet supported as discussed here
Seems like this is the default behavior of zsh. Follow instructions from git documentation to enable showing of git branch names:
https://git-scm.com/book/uz/v2/Appendix-A%3A-Git-in-Other-Environments-Git-in-Zsh