1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-09-24 12:30:08 +00:00

Add an indicator that directories were truncated.

This commit is contained in:
Dominik Ritter 2015-07-29 23:46:06 +02:00
parent 2bc3b09963
commit 99504d4ad4

View file

@ -456,7 +456,7 @@ prompt_dir() {
current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:.../:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c"
;;
truncate_from_right)
current_path=$(pwd | sed -e "s,^$HOME,~," | sed -E "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+\//\1\//g")
current_path=$(pwd | sed -e "s,^$HOME,~," | sed -E "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+\//\1..\//g")
;;
*)
current_path=$(pwd | sed -e "s,^$HOME,~," | sed -E "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})\//\1\.\.\2\//g")