Skip to content

Commit

Permalink
Fix git-root not working correctly for repositories in symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoCampinoti94 committed Oct 27, 2021
1 parent 1870306 commit 40b4dba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion functions/prompt-pwd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 40b4dba

Please sign in to comment.