From 40b4dbaec781abc9928ade965a4f6c3d338514fa Mon Sep 17 00:00:00 2001 From: Matteo Campinoti Date: Wed, 27 Oct 2021 14:30:58 +0200 Subject: [PATCH] Fix git-root not working correctly for repositories in symlinks --- functions/prompt-pwd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/prompt-pwd b/functions/prompt-pwd index 5a2d508..d114ee8 100644 --- a/functions/prompt-pwd +++ b/functions/prompt-pwd @@ -5,7 +5,7 @@ local git_root current_dir separator local -i dir_length if zstyle -t ':zim:prompt-pwd' git-root && \ git_root=$(command git rev-parse --show-toplevel 2>/dev/null); then - current_dir="${PWD#${git_root:h}/}" + current_dir="${$(pwd -P)#${git_root:h}/}" else current_dir=${(%):-%~} fi