summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2016-08-31 00:40:31 +0300
committerGitHub <noreply@github.com>2016-08-31 00:40:31 +0300
commit02820a9f3f6927e7e38a2831061a05cde777fd06 (patch)
tree8025c38f28a078343b77d907575f79a04bd18522 /powerlevel9k.zsh-theme
parent9d172f58c2fe8502e005b413cf22cf99df015907 (diff)
parentec53035b1314ad56918d65b7fce833d1ecbe3548 (diff)
Merge pull request #300 from andjscott/prompt_dir_shortening
Handle spaces in path when shortening
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme4
1 files changed, 2 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2a875f34..a1d18cb1 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -466,7 +466,7 @@ prompt_dir() {
current_path=$(pwd | sed -e "s,^$HOME,~," | sed $SED_EXTENDED_REGEX_PARAMETER "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})\//\1$POWERLEVEL9K_SHORTEN_DELIMITER\2\//g")
;;
truncate_from_right)
- current_path=$(truncatePathFromRight $(pwd | sed -e "s,^$HOME,~,") )
+ current_path=$(truncatePathFromRight "$(pwd | sed -e "s,^$HOME,~,")" )
;;
truncate_with_package_name)
local name repo_path package_path current_dir zero
@@ -493,7 +493,7 @@ prompt_dir() {
# from the package.json and append the current subdirectory
current_path="`echo $name | tr -d '"'`$subdirectory_path"
else
- current_path=$(truncatePathFromRight $(pwd | sed -e "s,^$HOME,~,") )
+ current_path=$(truncatePathFromRight "$(pwd | sed -e "s,^$HOME,~,")" )
fi
;;
*)