1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

Changed current_dir - Test Travis response

This commit is contained in:
Christo Kotze 2018-02-18 16:22:59 +04:00
parent 9a3dd6bf25
commit 4f1da4a64d

View File

@ -723,13 +723,14 @@ set_default POWERLEVEL9K_DIR_PATH_HIGHLIGHT_BOLD false
# * $1 Alignment: string - left|right
# * $2 Index: integer
prompt_dir() {
local current_dir="$(print -P "%~")"
local current_dir="$(echo $PWD)"
current_dir=${current_dir//$HOME/"~"}
local paths
[[ current_dir != "/" ]] && paths=(${(s:/:)current_dir}) # only split if not root folder
local cur_path cur_short_path directory dir_length cur_dir
if [[ -n "$POWERLEVEL9K_SHORTEN_DIR_LENGTH" || "$POWERLEVEL9K_SHORTEN_STRATEGY" == "truncate_with_folder_marker" ]]; then
set_default POWERLEVEL9K_SHORTEN_DELIMITER $'\u2026'
set_default POWERLEVEL9K_SHORTEN_DELIMITER "\u2026"
local delim=$(echo -n $POWERLEVEL9K_SHORTEN_DELIMITER) # convert delimiter from unicode to literal character if required
case "$POWERLEVEL9K_SHORTEN_STRATEGY" in