aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2017-02-13 02:18:34 +0300
committerDominik Ritter <dritter03@googlemail.com>2017-02-13 02:22:22 +0300
commitf6c65e3cf7b87a07b7dffb0c3d77a6932241c242 (patch)
tree6b85a91e069702cd1fd910b85593da31d7c82b48 /powerlevel9k.zsh-theme
parenta4cb875615bedc305168c694793616de8d72c1b3 (diff)
Get rid of unreadable BSU-pattern
Now the current folder in `truncate_with_folder_marker` strategy is truncated by cutting off the found folder from the beginning of $PWD.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme10
1 files changed, 3 insertions, 7 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index e6befc6d..55e33680 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -615,7 +615,7 @@ prompt_dir() {
fi
;;
truncate_with_folder_marker)
- local last_marked_folder marked_folder zero
+ local last_marked_folder marked_folder
set_default POWERLEVEL9K_SHORTEN_FOLDER_MARKER ".shorten_folder_marker"
# Search for the folder marker in the parent directories and
@@ -637,12 +637,8 @@ prompt_dir() {
done
# Replace the shortest possible match of the marked folder from
- # the current path. Remove the amount of characters up to the
- # folder marker from the left. Count only the visible characters
- # in the path (this is done by the "zero" pattern; see
- # http://stackoverflow.com/a/40855342/5586433).
- local zero='%([BSUbfksu]|([FB]|){*})'
- current_path=$current_path${PWD:${#${(S%%)last_marked_folder//$~zero/}}}
+ # the current path.
+ current_path=$current_path${PWD#${last_marked_folder}*}
;;
*)
current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:$POWERLEVEL9K_SHORTEN_DELIMITER/:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c"