We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a4e836 commit 914158cCopy full SHA for 914158c
1 file changed
git-prompt-kit.zsh
@@ -274,7 +274,11 @@ _git_prompt_kit_update_git() {
274
(( show_push_behind = ! GIT_PROMPT_KIT_HIDE_INACTIVE_AHEAD_BEHIND || VCS_STATUS_PUSH_COMMITS_BEHIND ))
275
276
# Git repo directory
277
- repo_root_path_components=( ${(s./.)VCS_STATUS_WORKDIR} )
+ if [[ ${VCS_STATUS_WORKDIR#$HOME} != $VCS_STATUS_WORKDIR ]]; then
278
+ repo_root_path_components=( "~" ${(s./.)${VCS_STATUS_WORKDIR#$HOME}} )
279
+ else
280
+ repo_root_path_components=( ${(s./.)VCS_STATUS_WORKDIR} )
281
+ fi
282
283
# path segments above the repo root dir
284
if (( GIT_PROMPT_KIT_CWD_MAX_TRAILING_COUNT + 1 >= ${#repo_root_path_components} )) || (( GIT_PROMPT_KIT_CWD_MAX_TRAILING_COUNT < 0 )); then
0 commit comments