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:
romkatv 2020-03-06 10:16:02 +01:00
commit a2af168eb4
2 changed files with 6 additions and 5 deletions

View file

@ -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() {