mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 00:10:08 +00:00
Changed the default behaviour to truncate whole directories.
This commit is contained in:
@@ -484,14 +484,14 @@ prompt_dir() {
|
||||
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" ]]; then
|
||||
|
||||
case "$POWERLEVEL9K_SHORTEN_STRATEGY" in
|
||||
complete_directories)
|
||||
current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:.../:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c"
|
||||
truncate_middle)
|
||||
current_path=$(pwd | sed -e "s,^$HOME,~," | sed -E "s/([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})[^/]+([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})\//\1\.\.\2\//g")
|
||||
;;
|
||||
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})[^/]+([^/]{$POWERLEVEL9K_SHORTEN_DIR_LENGTH})\//\1\.\.\2\//g")
|
||||
current_path="%$((POWERLEVEL9K_SHORTEN_DIR_LENGTH+1))(c:.../:)%${POWERLEVEL9K_SHORTEN_DIR_LENGTH}c"
|
||||
;;
|
||||
esac
|
||||
|
||||
|
||||
Reference in New Issue
Block a user