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

Improved truncation code

This commit is contained in:
Christo Kotze 2018-02-19 16:05:58 +04:00
parent fb09d75391
commit 58342612eb

View file

@ -861,8 +861,8 @@ prompt_dir() {
trunc_path+="$test_dir/"
cur_path+="$directory/"
done
[[ $current_path == "~"* ]] && current_path="~/" || current_path=""
current_path+="${trunc_path: : -1}"
[[ $current_path == "~"* ]] && trunc_path="~/$trunc_path"
current_path="${trunc_path: : -1}"
fi
;;
*)