Revert "terminate links with ST instead of BEL"

This reverts commit a2af168eb4.

Reason: Konsole has a bug that triggers when using \e\ instead of \a.
pull/567/head
romkatv 5 years ago
parent 65065ab658
commit 13523b117d

@ -1980,8 +1980,8 @@ prompt_dir() {
local content="${(pj.$sep.)parts}" local content="${(pj.$sep.)parts}"
if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )); then if (( _POWERLEVEL9K_DIR_HYPERLINK && _p9k_term_has_href )); then
local header=$'%{\e]8;;file://'${${_p9k__cwd//\%/%%25}//'#'/%%23}$'\e\\%}' local header=$'%{\e]8;;file://'${${_p9k__cwd//\%/%%25}//'#'/%%23}$'\a%}'
local footer=$'%{\e]8;;\e\\%}' local footer=$'%{\e]8;;\a%}'
if (( expand )); then if (( expand )); then
_p9k_escape $header _p9k_escape $header
header=$_p9k__ret header=$_p9k__ret
@ -5980,7 +5980,7 @@ function _p9k_clear_instant_prompt() {
echo -E - "" echo -E - ""
echo -E - "${(%):-For details, see:}" echo -E - "${(%):-For details, see:}"
if (( _p9k_term_has_href )); then if (( _p9k_term_has_href )); then
echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e\\https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\e\\}" echo - "${(%):-\e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt\e]8;;\a}"
else else
echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}" echo - "${(%):-https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt}"
fi fi
@ -7920,7 +7920,7 @@ _p9k_init() {
>&2 echo -E - "" >&2 echo -E - ""
>&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}" >&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}"
if (( _p9k_term_has_href )); then if (( _p9k_term_has_href )); then
>&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e\\https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e]8;;\e\\.}" >&2 echo - "${(%):- See \e]8;;https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\ahttps://github.com/romkatv/powerlevel10k/blob/master/README.md#installation\e]8;;\a.}"
else else
>&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}" >&2 echo - "${(%):- See https://github.com/romkatv/powerlevel10k/blob/master/README.md#installation.}"
fi fi

@ -154,7 +154,7 @@ function print_prompt() {
function href() { function href() {
local url=${${1//\%/%%}//\\/\\\\} local url=${${1//\%/%%}//\\/\\\\}
if (( _p9k_term_has_href )); then if (( _p9k_term_has_href )); then
print -r -- '%{\e]8;;'$url'\e\\%}'$url'%{\e]8;;\e\\%}' print -r -- '%{\e]8;;'$url'\a%}'$url'%{\e]8;;\a%}'
else else
print -r -- $url print -r -- $url
fi fi

Loading…
Cancel
Save