fix: fix OSC 8 hyperlink escape sequences

This commit is contained in:
Marc Cornellà 2022-10-12 10:49:44 +02:00
parent 11daa7dd5f
commit f80cf12092
No known key found for this signature in database
GPG key ID: 0314585E776A9C1B
2 changed files with 2 additions and 2 deletions

View file

@ -185,7 +185,7 @@ supports_truecolor() {
fmt_link() { fmt_link() {
# $1: text, $2: url, $3: fallback mode # $1: text, $2: url, $3: fallback mode
if supports_hyperlinks; then if supports_hyperlinks; then
printf '\033]8;;%s\a%s\033]8;;\a\n' "$2" "$1" printf '\033]8;;%s\033\\%s\033]8;;\033\\\n' "$2" "$1"
return return
fi fi

View file

@ -107,7 +107,7 @@ supports_truecolor() {
fmt_link() { fmt_link() {
# $1: text, $2: url, $3: fallback mode # $1: text, $2: url, $3: fallback mode
if supports_hyperlinks; then if supports_hyperlinks; then
printf '\033]8;;%s\a%s\033]8;;\a\n' "$2" "$1" printf '\033]8;;%s\033\\%s\033]8;;\033\\\n' "$2" "$1"
return return
fi fi