4fca7ccb55eb4904f515806ffca51d27ee1cc670

Author
Ross Williams <ross@ross-williams.net>
Committer
GitHub <noreply@github.com>
Date

Message

feat(tools): update `supports_hyperlinks` (#12258)

Update to https://github.com/zkat/supports-hyperlinks/releases/tag/v3.0.0

Diff

 1diff --git a/tools/changelog.sh b/tools/changelog.sh
 2index 3ad8fe786e6d1ac4e87a11891d9f0aa60b413ef3..c4b26079e5f773e5020590a48df074038746974d 100755
 3--- a/tools/changelog.sh
 4+++ b/tools/changelog.sh
 5@@ -221,11 +221,16 @@ supports_hyperlinks() {
 6 
 7   # If $TERM_PROGRAM is set, these terminals support hyperlinks
 8   case "$TERM_PROGRAM" in
 9-  Hyper|iTerm.app|terminology|WezTerm) return 0 ;;
10+  Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;;
11   esac
12 
13-  # kitty supports hyperlinks
14-  if [ "$TERM" = xterm-kitty ]; then
15+  # These termcap entries support hyperlinks
16+  case "$TERM" in
17+  xterm-kitty|alacritty|alacritty-direct) return 0 ;;
18+  esac
19+
20+  # xfce4-terminal supports hyperlinks
21+  if [ "$COLORTERM" = "xfce4-terminal" ]; then
22     return 0
23   fi
24 
25diff --git a/tools/install.sh b/tools/install.sh
26index 508fc2f7739fa635889f269ce4c2bfd343aa10cf..e3613a28bce9c9c1d9228a69f070c6e0c49f0bfd 100755
27--- a/tools/install.sh
28+++ b/tools/install.sh
29@@ -166,11 +166,16 @@ supports_hyperlinks() {
30 
31   # If $TERM_PROGRAM is set, these terminals support hyperlinks
32   case "$TERM_PROGRAM" in
33-  Hyper|iTerm.app|terminology|WezTerm) return 0 ;;
34+  Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;;
35   esac
36 
37-  # kitty supports hyperlinks
38-  if [ "$TERM" = xterm-kitty ]; then
39+  # These termcap entries support hyperlinks
40+  case "$TERM" in
41+  xterm-kitty|alacritty|alacritty-direct) return 0 ;;
42+  esac
43+
44+  # xfce4-terminal supports hyperlinks
45+  if [ "$COLORTERM" = "xfce4-terminal" ]; then
46     return 0
47   fi
48 
49diff --git a/tools/upgrade.sh b/tools/upgrade.sh
50index f7a263d667c5da0d33ff9858f8a8d46a91310c94..d7016aa449ccf1fe06bcc70306cda3879d1f7c92 100755
51--- a/tools/upgrade.sh
52+++ b/tools/upgrade.sh
53@@ -90,11 +90,16 @@ supports_hyperlinks() {
54 
55   # If $TERM_PROGRAM is set, these terminals support hyperlinks
56   case "$TERM_PROGRAM" in
57-  Hyper|iTerm.app|terminology|WezTerm) return 0 ;;
58+  Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;;
59   esac
60 
61-  # kitty supports hyperlinks
62-  if [ "$TERM" = xterm-kitty ]; then
63+  # These termcap entries support hyperlinks
64+  case "$TERM" in
65+  xterm-kitty|alacritty|alacritty-direct) return 0 ;;
66+  esac
67+
68+  # xfce4-terminal supports hyperlinks
69+  if [ "$COLORTERM" = "xfce4-terminal" ]; then
70     return 0
71   fi
72