aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2022-01-04 14:05:05 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2022-01-04 14:05:05 +0300
commit3d3b24c419a3b35b632e96fe9de34641e06f8521 (patch)
treefd53103ad7ecdb10604153f91227080316ef37ae
parent73546881235dae77f9f93e7525d63b4c1f486397 (diff)
work around bugs in WSL where it /proc/pid/cwd reports an alias drive
-rw-r--r--internal/p10k.zsh6
1 files changed, 5 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 591cff18..db3495e9 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -200,7 +200,11 @@ function _p9k_read_word() {
}
function _p9k_fetch_cwd() {
- _p9k__cwd=${${${:-.}:a}:-.}
+ if [[ $PWD == /* && $PWD -ef . ]]; then
+ _p9k__cwd=$PWD
+ else
+ _p9k__cwd=${${${:-.}:a}:-.}
+ fi
_p9k__cwd_a=${${_p9k__cwd:A}:-.}
case $_p9k__cwd in