mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
Merge branch 'master' of https://github.com/ohmyzsh/ohmyzsh
This commit is contained in:
commit
9a32988974
138 changed files with 1492 additions and 805 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -20,14 +20,16 @@ zstyle -s ':omz:update' mode update_mode || {
|
|||
}
|
||||
|
||||
# Cancel update if:
|
||||
# - the automatic update is disabled.
|
||||
# - the current user doesn't have write permissions nor owns the $ZSH directory.
|
||||
# - the automatic update is disabled
|
||||
# - the current user doesn't have write permissions nor owns the $ZSH directory
|
||||
# - is not run from a tty
|
||||
# - git is unavailable on the system.
|
||||
# - git is unavailable on the system
|
||||
# - $ZSH is not a git repository
|
||||
if [[ "$update_mode" = disabled ]] \
|
||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||
|| [[ ! -t 1 ]] \
|
||||
|| ! command git --version 2>&1 >/dev/null; then
|
||||
|| ! command git --version 2>&1 >/dev/null \
|
||||
|| (builtin cd -q "$ZSH"; ! command git rev-parse --is-inside-work-tree &>/dev/null); then
|
||||
unset update_mode
|
||||
return
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -164,11 +164,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
|
||||
|
||||
|
|
|
|||
|
|
@ -10,9 +10,14 @@ fi
|
|||
|
||||
# Protect against unwanted sourcing
|
||||
case "$ZSH_EVAL_CONTEXT" in
|
||||
*:file) echo "error: this file should not be sourced" && return ;;
|
||||
*:file) echo "error: this file should not be sourced" && return 1 ;;
|
||||
esac
|
||||
|
||||
# Define "$ZSH" if not defined -- in theory this should be `export`ed by the calling script
|
||||
if [[ -z "$ZSH" ]]; then
|
||||
ZSH="${0:a:h:h}"
|
||||
fi
|
||||
|
||||
cd "$ZSH"
|
||||
|
||||
verbose_mode="default"
|
||||
|
|
@ -90,11 +95,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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue