reobin / typewritten

A minimal, lightweight, informative zsh prompt theme

Home Page:https://typewritten.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Git relative path showing root directory name twice when in Git root

pfandzelter opened this issue · comments

I have set TYPEWRITTEN_GIT_RELATIVE_PATH=true to always show me the name of the root Git directory. When I cd into a Git directory now, it sometimes shows the directory name twice instead of once. For example, cd-ing into my local clone of the typewritten repo shows this right prompt:

https://i.imgur.com/jdOLImQ.png

This isn't always the case, only in the folder I keep my projects in.
I believe that the main issue here is that this overarching project folder has two different names: git shows the folder name tubCloud, which is the real folder name. pwd, on the other hand, shows the name I used to cd into this directory: I have Uni symlinked to tubCloud to make things easier for me.

https://i.imgur.com/Zn3czLi.png

I have no idea if this would be easily fixable easily or not, but thanks for taking a look anyway!

EDIT: I was actually able to fix this myself quite easily, please see my PR