1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-23 23:51:58 +00:00

Merge pull request #1175 from dritter/port_wrboyce_truncation_fix

Fix home dir shortening when using package_name truncation strategy
This commit is contained in:
Dominik Ritter 2019-03-02 09:49:46 +01:00 committed by GitHub
commit 758bc175d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -905,6 +905,8 @@ prompt_dir() {
package_path=${$(pwd)%%/.git*} package_path=${$(pwd)%%/.git*}
fi fi
[[ ${(L)POWERLEVEL9K_DIR_PATH_ABSOLUTE} != "true" ]] && package_path=${package_path/$HOME/"~"}
# Replace the shortest possible match of the marked folder from # Replace the shortest possible match of the marked folder from
# the current path. Remove the amount of characters up to the # the current path. Remove the amount of characters up to the
# folder marker from the left. Count only the visible characters # folder marker from the left. Count only the visible characters