f80cf12092edb1bed8b7972bc1b9d63c836a9be7

Author
Marc Cornellà <hello@mcornella.com>
Committer
Marc Cornellà <hello@mcornella.com>
Date

Message

fix: fix OSC 8 hyperlink escape sequences

Diff

 1diff --git a/tools/install.sh b/tools/install.sh
 2index 495ad2c1136045fe81ed1d6444eae88173cd680a..bc372305082cd0d22d35b06bb7af000bac6841c5 100755
 3--- a/tools/install.sh
 4+++ b/tools/install.sh
 5@@ -185,7 +185,7 @@ supports_truecolor() {
 6 fmt_link() {
 7   # $1: text, $2: url, $3: fallback mode
 8   if supports_hyperlinks; then
 9-    printf '\033]8;;%s\a%s\033]8;;\a\n' "$2" "$1"
10+    printf '\033]8;;%s\033\\%s\033]8;;\033\\\n' "$2" "$1"
11     return
12   fi
13 
14diff --git a/tools/upgrade.sh b/tools/upgrade.sh
15index afc6a98ddf2b3e50f7938ca92cbdb6393a9c3a0a..2f3b4dae337a022c915ed8cae58a464f33843e70 100755
16--- a/tools/upgrade.sh
17+++ b/tools/upgrade.sh
18@@ -107,7 +107,7 @@ supports_truecolor() {
19 fmt_link() {
20   # $1: text, $2: url, $3: fallback mode
21   if supports_hyperlinks; then
22-    printf '\033]8;;%s\a%s\033]8;;\a\n' "$2" "$1"
23+    printf '\033]8;;%s\033\\%s\033]8;;\033\\\n' "$2" "$1"
24     return
25   fi
26