aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-01-16 13:06:25 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-01-16 13:06:25 +0300
commita0f3d94dd660aac92ecc36329bc8a3219c42f586 (patch)
tree12402eb8abbb19dba13aed592fb634ce6a1ae4c5
parent8a9e8791649651044ef2e34732077ac455f18a62 (diff)
fix POWERLEVEL9K_DIR_HYPERLINK=true with POWERLEVEL9K_SHORTEN_STRATEGY=truncate_from_right
fixes #420
-rw-r--r--internal/p10k.zsh14
1 files changed, 7 insertions, 7 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 70fefe3d..b008af3e 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -1657,15 +1657,15 @@ prompt_dir() {
local content="${(pj.$sep.)parts}"
if (( _POWERLEVEL9K_DIR_HYPERLINK )); then
- local pref=$'%{\e]8;;file://'${${_p9k_pwd//\%/%%25}//'#'/%%23}$'\a%}'
- local suf=$'%{\e]8;;\a%}'
+ local header=$'%{\e]8;;file://'${${_p9k_pwd//\%/%%25}//'#'/%%23}$'\a%}'
+ local footer=$'%{\e]8;;\a%}'
if (( expand )); then
- _p9k_escape $pref
- pref=$_p9k_ret
- _p9k_escape $suf
- suf=$_p9k_ret
+ _p9k_escape $header
+ header=$_p9k_ret
+ _p9k_escape $footer
+ footer=$_p9k_ret
fi
- content=$pref$content$suf
+ content=$header$content$footer
fi
(( expand )) && _p9k_prompt_length "${(e):-"\${\${_p9k_d::=0}+}$content"}" || _p9k_ret=