work around bugs in WSL where it /proc/pid/cwd reports an alias drive

pull/1710/head
Roman Perepelitsa 3 years ago
parent 7354688123
commit 3d3b24c419

@ -200,7 +200,11 @@ function _p9k_read_word() {
} }
function _p9k_fetch_cwd() { function _p9k_fetch_cwd() {
if [[ $PWD == /* && $PWD -ef . ]]; then
_p9k__cwd=$PWD
else
_p9k__cwd=${${${:-.}:a}:-.} _p9k__cwd=${${${:-.}:a}:-.}
fi
_p9k__cwd_a=${${_p9k__cwd:A}:-.} _p9k__cwd_a=${${_p9k__cwd:A}:-.}
case $_p9k__cwd in case $_p9k__cwd in

Loading…
Cancel
Save