aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorWuestengecko <1579756+Wuestengecko@users.noreply.github.com>2019-02-01 19:43:52 +0300
committerGitHub <noreply@github.com>2019-02-01 19:43:52 +0300
commit8f603093862d519caad072e102d22c515e8847b5 (patch)
treeaec95fc867a5dbb86e202bb0207e4caf31536962 /powerlevel9k.zsh-theme
parent5c7d1009de08caf7297c099f4ec0cf6d03ae8e6a (diff)
Only abbreviate $HOME at the beginning of cwd
Fixes #1150
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme2
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 63724823..43d423a0 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -797,7 +797,7 @@ prompt_dir() {
# using $PWD instead of "$(print -P '%~')" to allow use of POWERLEVEL9K_DIR_PATH_ABSOLUTE
local current_path=$PWD # WAS: local current_path="$(print -P '%~')"
# check if the user wants to use absolute paths or "~" paths
- [[ ${(L)POWERLEVEL9K_DIR_PATH_ABSOLUTE} != "true" ]] && current_path=${current_path//$HOME/"~"}
+ [[ ${(L)POWERLEVEL9K_DIR_PATH_ABSOLUTE} != "true" ]] && current_path=${current_path/#$HOME/"~"}
# declare all local variables
local paths directory test_dir test_dir_length trunc_path threshhold
# if we are not in "~" or "/", split the paths into an array and exclude "~"