diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-03-06 12:16:02 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-03-06 12:16:02 +0300 |
commit | a2af168eb4099cd2f19fcb671ef6b5d55f5bc7f9 (patch) | |
tree | 5b1cf28a6545f3be7e2d06fd9c5a4fcb43dc9066 /internal/wizard.zsh | |
parent | e7d167bdb5637005bcb0ad1f470d2839fe1ca458 (diff) |
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.)
Diffstat (limited to 'internal/wizard.zsh')
-rwxr-xr-x | internal/wizard.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 6dc380bd..4d91f95c 100755 --- a/internal/wizard.zsh +++ b/internal/wizard.zsh @@ -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() { |