1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-12 08:10:07 +00:00

added fishe-like shortening strategy

This commit is contained in:
Niklas Heer 2015-12-30 15:49:23 +01:00
parent 4437e539e9
commit 2fdbd6158c

View file

@ -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"
;;