diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2019-02-02 02:48:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-02 02:48:54 +0300 |
commit | 22f6495005dc999244e931d3dab44d7ca063a272 (patch) | |
tree | f0e70e201a41453eb916eb3cfcbb3d445b4b9c6a /powerlevel9k.zsh-theme | |
parent | 08798d12ad0b7e32423c0eb8623189db180fd094 (diff) | |
parent | 8bb86908d74097cda237115273acfdbaa5f39ea1 (diff) |
Merge pull request #1151 from Wuestengecko/bugfix-1150
[Bugfix] Only abbreviate $HOME at the beginning of cwd
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 8cdde608..24967429 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -798,7 +798,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 "~" |