Skip to content

Commit

Permalink
feat(tools): update supports_hyperlinks (ohmyzsh#12258)
Browse files Browse the repository at this point in the history
  • Loading branch information
overhacked authored Mar 7, 2024
1 parent 2a71aa5 commit 4fca7cc
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 9 deletions.
11 changes: 8 additions & 3 deletions tools/changelog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 8 additions & 3 deletions tools/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 8 additions & 3 deletions tools/upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4fca7cc

Please sign in to comment.