mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
terminate links with ST instead of BEL
See https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda. The sequence is terminated with ST (string terminator) which is typically ESC \. (Although ST is the standard sequence according to ECMA-48 §8.3.89, often the BEL (\a) character is used instead. This nonstandard choice originates from XTerm, and was later adopted by probably all terminal emulators to terminate OSC sequences. Nevertheless, we encourage the use of the standard ST.)
This commit is contained in:
parent
e7d167bdb5
commit
a2af168eb4
2 changed files with 6 additions and 5 deletions
|
@ -1980,8 +1980,8 @@ prompt_dir() {
|
|||
|
||||
local content="${(pj.$sep.)parts}"
|
||||
if (( _POWERLEVEL9K_DIR_HYPERLINK )); then
|
||||
local header=$'%{\e]8;;file://'${${_p9k__cwd//\%/%%25}//'#'/%%23}$'\a%}'
|
||||
local footer=$'%{\e]8;;\a%}'
|
||||
local header=$'%{\e]8;;file://'${${_p9k__cwd//\%/%%25}//'#'/%%23}$'\e\\%}'
|
||||
local footer=$'%{\e]8;;\e\\%}'
|
||||
if (( expand )); then
|
||||
_p9k_escape $header
|
||||
header=$_p9k__ret
|
||||
|
@ -5921,7 +5921,7 @@ function _p9k_clear_instant_prompt() {
|
|||
echo -E - "${(%):- * Zsh will start %Bquickly%b but prompt will %Bjump down%b after initialization.}"
|
||||
echo -E - ""
|
||||
echo -E - "${(%):-For details, see:}"
|
||||
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}"
|
||||
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 - ""
|
||||
echo - "${(%):-%3F-- console output produced during zsh initialization follows --%f}"
|
||||
echo -E - ""
|
||||
|
@ -7840,7 +7840,7 @@ _p9k_init() {
|
|||
>&2 echo -E - "${(%):-You can:}"
|
||||
>&2 echo -E - ""
|
||||
>&2 echo -E - "${(%):- - %BRecommended%b: Change the way Powerlevel10k is loaded from %B$__p9k_zshrc_u%b.}"
|
||||
>&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.}"
|
||||
>&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\\.}"
|
||||
if (( $+functins[zplugin] )); then
|
||||
>&2 echo -E - "${(%):- NOTE: If using %2Fzplugin%f to load %3F'romkatv/powerlevel10k'%f, %Bdo not apply%b %1Fice wait%f.}"
|
||||
fi
|
||||
|
|
|
@ -152,7 +152,8 @@ function print_prompt() {
|
|||
}
|
||||
|
||||
function href() {
|
||||
print -r -- $'%{\e]8;;'${1//\%/%%}$'\a%}'${1//\%/%%}$'%{\e]8;;\a%}'
|
||||
local url=${${1//\%/%%}//\\/\\\\}
|
||||
print -r -- '%{\e]8;;'$url'\e\\%}'$url'%{\e]8;;\e\\%}'
|
||||
}
|
||||
|
||||
function flowing() {
|
||||
|
|
Loading…
Reference in a new issue