summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2022-11-05 14:55:11 -0700
committerTuowen Zhao <ztuowen@gmail.com>2022-11-05 14:55:11 -0700
commit04b8c052e5b624873b352889423c753ed1baf9c4 (patch)
tree78e14fe69e61d69709f31f91b7ae29fe8bc74477 /tools
parent1a6dcd017dbf564058a729032de3db139fcf9c7e (diff)
parent80fdbc9b91a9acca42fb90065b5e64a9722978a7 (diff)
downloadzsh-04b8c052e5b624873b352889423c753ed1baf9c4.tar.gz
zsh-04b8c052e5b624873b352889423c753ed1baf9c4.tar.bz2
zsh-04b8c052e5b624873b352889423c753ed1baf9c4.zip
Merge remote-tracking branch 'github/master'
Diffstat (limited to 'tools')
-rwxr-xr-xtools/install.sh14
-rwxr-xr-xtools/require_tool.sh2
-rwxr-xr-xtools/upgrade.sh12
3 files changed, 20 insertions, 8 deletions
diff --git a/tools/install.sh b/tools/install.sh
index 495ad2c11..a6538f9d7 100755
--- a/tools/install.sh
+++ b/tools/install.sh
@@ -156,11 +156,17 @@ supports_hyperlinks() {
return 0
fi
- # Windows Terminal or Konsole also support hyperlinks
- if [ -n "$WT_SESSION" ] || [ -n "$KONSOLE_VERSION" ]; then
+ # Windows Terminal also supports hyperlinks
+ if [ -n "$WT_SESSION" ]; then
return 0
fi
+ # Konsole supports hyperlinks, but it's an opt-in setting that can't be detected
+ # https://github.com/ohmyzsh/ohmyzsh/issues/10964
+ # if [ -n "$KONSOLE_VERSION" ]; then
+ # return 0
+ # fi
+
return 1
}
@@ -185,7 +191,7 @@ supports_truecolor() {
fmt_link() {
# $1: text, $2: url, $3: fallback mode
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
fi
@@ -267,7 +273,7 @@ setup_ohmyzsh() {
}
ostype=$(uname)
- if [ -z "${ostype%CYGWIN*}" ] && git --version | grep -q msysgit; then
+ if [ -z "${ostype%CYGWIN*}" ] && git --version | grep -Eq 'msysgit|windows'; then
fmt_error "Windows/MSYS Git is not supported on Cygwin"
fmt_error "Make sure the Cygwin git package is installed and is first on the \$PATH"
exit 1
diff --git a/tools/require_tool.sh b/tools/require_tool.sh
index 1fa77f77a..19c5f6fa9 100755
--- a/tools/require_tool.sh
+++ b/tools/require_tool.sh
@@ -107,7 +107,7 @@ usage() {
NAME
require_tool.sh - Ensure version of a tool is greater than the one expected
-SYNOPSYS
+SYNOPSIS
require_tool.sh [ -h ]
[ --help ]
[ TOOL MIN_VERSION ]
diff --git a/tools/upgrade.sh b/tools/upgrade.sh
index afc6a98dd..596a59302 100755
--- a/tools/upgrade.sh
+++ b/tools/upgrade.sh
@@ -78,11 +78,17 @@ supports_hyperlinks() {
return 0
fi
- # Windows Terminal or Konsole also support hyperlinks
- if [ -n "$WT_SESSION" ] || [ -n "$KONSOLE_VERSION" ]; then
+ # Windows Terminal also supports hyperlinks
+ if [ -n "$WT_SESSION" ]; then
return 0
fi
+ # Konsole supports hyperlinks, but it's an opt-in setting that can't be detected
+ # https://github.com/ohmyzsh/ohmyzsh/issues/10964
+ # if [ -n "$KONSOLE_VERSION" ]; then
+ # return 0
+ # fi
+
return 1
}
@@ -107,7 +113,7 @@ supports_truecolor() {
fmt_link() {
# $1: text, $2: url, $3: fallback mode
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
fi