aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiklas Heer <niklas.heer@gmail.com>2015-12-30 17:49:23 +0300
committerNiklas Heer <niklas.heer@gmail.com>2015-12-30 17:49:23 +0300
commit2fdbd6158c78a0b1786d6a030629fe3a930fc46d (patch)
treee5e4f64b186debdb2f3952aa7645da3fff0cbdd1
parent4437e539e9541251746b0917bfd0aea1ffa3493a (diff)
added fishe-like shortening strategy
-rwxr-xr-xpowerlevel9k.zsh-theme3
1 files changed, 3 insertions, 0 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 19c5ea98..eed524ae 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -414,6 +414,9 @@ prompt_dir() {
truncate_from_right)
current_path=$(pwd | sed -e "s,^$HOME,~," | sed $SED_EXTENDED_REGEX_PARAMETER "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+\//\1..\//g")
;;
+ truncate_fish_like)
+ current_path=$(pwd | sed -e "s,^$HOME,~," | sed $SED_EXTENDED_REGEX_PARAMETER "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+\//\1\//g")
+ ;;
*)
current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:.../:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c"
;;