From 4fca7ccb55eb4904f515806ffca51d27ee1cc670 Mon Sep 17 00:00:00 2001 From: Ross Williams Date: Thu, 7 Mar 2024 03:54:43 -0500 Subject: [PATCH] feat(tools): update `supports_hyperlinks` (#12258) Update to https://github.com/zkat/supports-hyperlinks/releases/tag/v3.0.0 --- tools/changelog.sh | 11 ++++++++--- tools/install.sh | 11 ++++++++--- tools/upgrade.sh | 11 ++++++++--- 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/tools/changelog.sh b/tools/changelog.sh index 3ad8fe786..c4b26079e 100755 --- a/tools/changelog.sh +++ b/tools/changelog.sh @@ -221,11 +221,16 @@ supports_hyperlinks() { # If $TERM_PROGRAM is set, these terminals support hyperlinks case "$TERM_PROGRAM" in - Hyper|iTerm.app|terminology|WezTerm) return 0 ;; + Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;; esac - # kitty supports hyperlinks - if [ "$TERM" = xterm-kitty ]; then + # These termcap entries support hyperlinks + case "$TERM" in + xterm-kitty|alacritty|alacritty-direct) return 0 ;; + esac + + # xfce4-terminal supports hyperlinks + if [ "$COLORTERM" = "xfce4-terminal" ]; then return 0 fi diff --git a/tools/install.sh b/tools/install.sh index 508fc2f77..e3613a28b 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -166,11 +166,16 @@ supports_hyperlinks() { # If $TERM_PROGRAM is set, these terminals support hyperlinks case "$TERM_PROGRAM" in - Hyper|iTerm.app|terminology|WezTerm) return 0 ;; + Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;; esac - # kitty supports hyperlinks - if [ "$TERM" = xterm-kitty ]; then + # These termcap entries support hyperlinks + case "$TERM" in + xterm-kitty|alacritty|alacritty-direct) return 0 ;; + esac + + # xfce4-terminal supports hyperlinks + if [ "$COLORTERM" = "xfce4-terminal" ]; then return 0 fi diff --git a/tools/upgrade.sh b/tools/upgrade.sh index f7a263d66..d7016aa44 100755 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -90,11 +90,16 @@ supports_hyperlinks() { # If $TERM_PROGRAM is set, these terminals support hyperlinks case "$TERM_PROGRAM" in - Hyper|iTerm.app|terminology|WezTerm) return 0 ;; + Hyper|iTerm.app|terminology|WezTerm|vscode) return 0 ;; esac - # kitty supports hyperlinks - if [ "$TERM" = xterm-kitty ]; then + # These termcap entries support hyperlinks + case "$TERM" in + xterm-kitty|alacritty|alacritty-direct) return 0 ;; + esac + + # xfce4-terminal supports hyperlinks + if [ "$COLORTERM" = "xfce4-terminal" ]; then return 0 fi