From fb5bcf70fd52c414e4deb8c96f47d461f4e9da57 Mon Sep 17 00:00:00 2001 From: Hoang Minh Huong Date: Tue, 28 Oct 2025 22:41:39 +0700 Subject: [PATCH 1/2] fix(prompt_dir): adjust path formatting for Windows compatibility --- internal/p10k.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index f73dd208..263500f7 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2131,7 +2131,12 @@ prompt_dir() { local content="${(pj.$sep.)parts}" if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )) && [[ $_p9k__cwd == /* ]]; then - _p9k_url_escape $_p9k__cwd + local cur_path=$_p9k__cwd + if [[ $_p9k_os == Windows && $cur_path != *:* ]]; then + # Change /c/current/path to /c:/current/path + cur_path="${_p9k__cwd:0:2}:${_p9k__cwd:2}" + fi + _p9k_url_escape $cur_path local header=$'%{\e]8;;file://'$_p9k__ret$'\a%}' local footer=$'%{\e]8;;\a%}' if (( expand )); then From b0b98ed439a288d9a15ee1c4c2585e408c2265b1 Mon Sep 17 00:00:00 2001 From: Hoang Minh Huong Date: Tue, 28 Oct 2025 23:11:06 +0700 Subject: [PATCH 2/2] fix(prompt_dir): converting drive letters to uppercase --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 263500f7..6a348c65 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -2134,7 +2134,7 @@ prompt_dir() { local cur_path=$_p9k__cwd if [[ $_p9k_os == Windows && $cur_path != *:* ]]; then # Change /c/current/path to /c:/current/path - cur_path="${_p9k__cwd:0:2}:${_p9k__cwd:2}" + cur_path="${_p9k__cwd:0:2:u}:${_p9k__cwd:2}" fi _p9k_url_escape $cur_path local header=$'%{\e]8;;file://'$_p9k__ret$'\a%}'