fix(prompt_dir): adjust path formatting for Windows compatibility
This commit is contained in:
parent
36f3045d69
commit
fb5bcf70fd
|
|
@ -2131,7 +2131,12 @@ prompt_dir() {
|
||||||
|
|
||||||
local content="${(pj.$sep.)parts}"
|
local content="${(pj.$sep.)parts}"
|
||||||
if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )) && [[ $_p9k__cwd == /* ]]; then
|
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 header=$'%{\e]8;;file://'$_p9k__ret$'\a%}'
|
||||||
local footer=$'%{\e]8;;\a%}'
|
local footer=$'%{\e]8;;\a%}'
|
||||||
if (( expand )); then
|
if (( expand )); then
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue