mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
Merge remote-tracking branch 'upstream/master'
* upstream/master: (237 commits) feat(z): update to version afaf2965 (#12136) feat(gitfast): update to version v2.0 (#12135) ci(project): use ohmyzsh's bot credentials ci(dependencies): fix some envs and add requirements feat(git): add `gcB` alias (#12116) feat(aws): add support for sso sessions login (#12090) feat(aws): add sso logout capabilities (#12113) fix(bgnotify): don't require accessibility perms in macos (#11433) fix(nvm): prevent duplicates in lazy_cmd feat(react-native): add aliases for iPhone 15 (#12114) fix(bgnotify): make it work with `set -e` (#12111) fix(changelog): use longer hashes for commits (#12096) fix(rake-fast): make `.rake_tasks` write atomic (#12108) ci(dependencies): fix typo ci(dependencies): add automation for updating external dependencies (#12109) feat(dotnet): update completion script (#12028) feat(frontend-search): add `I am lucky` option feat(frontend-search): add nextjs fix(lib): patch `omz_urlencode` to not encode UTF-8 chars in Termux (#12076) feat(bgnotify): add option to disable terminal bell (#12077) ... # Conflicts: # README.md
This commit is contained in:
commit
c876a57173
181 changed files with 3830 additions and 1615 deletions
|
|
@ -106,6 +106,9 @@ function parse-commit {
|
|||
message="${match[1]}"
|
||||
# remove CR characters (might be inserted in GitHub UI commit description form)
|
||||
message="${message//$'\r'/}"
|
||||
# remove lines containing only whitespace
|
||||
local nlnl=$'\n\n'
|
||||
message="${message//$'\n'[[:space:]]##$'\n'/$nlnl}"
|
||||
# skip next paragraphs (separated by two newlines or more)
|
||||
message="${message%%$'\n\n'*}"
|
||||
# ... and replace newlines with spaces
|
||||
|
|
@ -157,6 +160,89 @@ function parse-commit {
|
|||
fi
|
||||
}
|
||||
|
||||
################################
|
||||
# SUPPORTS HYPERLINKS FUNCTION #
|
||||
################################
|
||||
|
||||
# The code for checking if a terminal supports hyperlinks is copied from install.sh
|
||||
|
||||
# The [ -t 1 ] check only works when the function is not called from
|
||||
# a subshell (like in `$(...)` or `(...)`, so this hack redefines the
|
||||
# function at the top level to always return false when stdout is not
|
||||
# a tty.
|
||||
if [ -t 1 ]; then
|
||||
is_tty() {
|
||||
true
|
||||
}
|
||||
else
|
||||
is_tty() {
|
||||
false
|
||||
}
|
||||
fi
|
||||
|
||||
# This function uses the logic from supports-hyperlinks[1][2], which is
|
||||
# made by Kat Marchán (@zkat) and licensed under the Apache License 2.0.
|
||||
# [1] https://github.com/zkat/supports-hyperlinks
|
||||
# [2] https://crates.io/crates/supports-hyperlinks
|
||||
#
|
||||
# Copyright (c) 2021 Kat Marchán
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
supports_hyperlinks() {
|
||||
# $FORCE_HYPERLINK must be set and be non-zero (this acts as a logic bypass)
|
||||
if [ -n "$FORCE_HYPERLINK" ]; then
|
||||
[ "$FORCE_HYPERLINK" != 0 ]
|
||||
return $?
|
||||
fi
|
||||
|
||||
# If stdout is not a tty, it doesn't support hyperlinks
|
||||
is_tty || return 1
|
||||
|
||||
# DomTerm terminal emulator (domterm.org)
|
||||
if [ -n "$DOMTERM" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# VTE-based terminals above v0.50 (Gnome Terminal, Guake, ROXTerm, etc)
|
||||
if [ -n "$VTE_VERSION" ]; then
|
||||
[ $VTE_VERSION -ge 5000 ]
|
||||
return $?
|
||||
fi
|
||||
|
||||
# If $TERM_PROGRAM is set, these terminals support hyperlinks
|
||||
case "$TERM_PROGRAM" in
|
||||
Hyper|iTerm.app|terminology|WezTerm) return 0 ;;
|
||||
esac
|
||||
|
||||
# kitty supports hyperlinks
|
||||
if [ "$TERM" = xterm-kitty ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# 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
|
||||
}
|
||||
|
||||
#############################
|
||||
# RELEASE CHANGELOG DISPLAY #
|
||||
#############################
|
||||
|
|
@ -206,10 +292,17 @@ function display-release {
|
|||
function fmt:hash {
|
||||
#* Uses $hash from outer scope
|
||||
local hash="${1:-$hash}"
|
||||
local short_hash="${hash:0:7}" # 7 characters sha, top level sha is 12 characters
|
||||
case "$output" in
|
||||
raw) printf '%s' "$hash" ;;
|
||||
text) printf '\e[33m%s\e[0m' "$hash" ;; # red
|
||||
md) printf '[`%s`](https://github.com/ohmyzsh/ohmyzsh/commit/%s)' "$hash" "$hash" ;;
|
||||
raw) printf '%s' "$short_hash" ;;
|
||||
text)
|
||||
local text="\e[33m$short_hash\e[0m"; # red
|
||||
if supports_hyperlinks; then
|
||||
printf "\e]8;;%s\a%s\e]8;;\a" "https://github.com/ohmyzsh/ohmyzsh/commit/$hash" $text;
|
||||
else
|
||||
echo $text;
|
||||
fi ;;
|
||||
md) printf '[`%s`](https://github.com/ohmyzsh/ohmyzsh/commit/%s)' "$short_hash" "$hash" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
@ -272,7 +365,12 @@ function display-release {
|
|||
case "$output" in
|
||||
raw) printf '%s' "$subject" ;;
|
||||
# In text mode, highlight (#<issue>) and dim text between `backticks`
|
||||
text) sed -E $'s|#([0-9]+)|\e[32m#\\1\e[0m|g;s|`([^`]+)`|`\e[2m\\1\e[0m`|g' <<< "$subject" ;;
|
||||
text)
|
||||
if supports_hyperlinks; then
|
||||
sed -E $'s|#([0-9]+)|\e]8;;https://github.com/ohmyzsh/ohmyzsh/issues/\\1\a\e[32m#\\1\e[0m\e]8;;\a|g;s|`([^`]+)`|`\e[2m\\1\e[0m`|g' <<< "$subject"
|
||||
else
|
||||
sed -E $'s|#([0-9]+)|\e[32m#\\1\e[0m|g;s|`([^`]+)`|`\e[2m\\1\e[0m`|g' <<< "$subject"
|
||||
fi ;;
|
||||
# In markdown mode, link to (#<issue>) issues
|
||||
md) sed -E 's|#([0-9]+)|[#\1](https://github.com/ohmyzsh/ohmyzsh/issues/\1)|g' <<< "$subject" ;;
|
||||
esac
|
||||
|
|
@ -415,13 +513,13 @@ function main {
|
|||
# Git log options
|
||||
# -z: commits are delimited by null bytes
|
||||
# --format: [7-char hash]<field sep>[ref names]<field sep>[subject]<field sep>[body]
|
||||
# --abbrev=7: force commit hashes to be 7 characters long
|
||||
# --abbrev=7: force commit hashes to be 12 characters long
|
||||
# --no-merges: merge commits are omitted
|
||||
# --first-parent: commits from merged branches are omitted
|
||||
local SEP="0mZmAgIcSeP"
|
||||
local -a raw_commits
|
||||
raw_commits=(${(0)"$(command git -c log.showSignature=false log -z \
|
||||
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=7 \
|
||||
--format="%h${SEP}%D${SEP}%s${SEP}%b" --abbrev=12 \
|
||||
--no-merges --first-parent $range)"})
|
||||
|
||||
local raw_commit
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ fi
|
|||
# - prompt (default): the user is asked before updating when it's time to update
|
||||
# - auto: the update is performed automatically when it's time
|
||||
# - reminder: a reminder is shown to the user when it's time to update
|
||||
# - background-alpha: an experimental update-on-the-background option
|
||||
# - disabled: automatic update is turned off
|
||||
zstyle -s ':omz:update' mode update_mode || {
|
||||
update_mode=prompt
|
||||
|
|
@ -91,13 +92,37 @@ function is_update_available() {
|
|||
}
|
||||
|
||||
function update_last_updated_file() {
|
||||
echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update"
|
||||
local exit_status="$1" error="$2"
|
||||
|
||||
if [[ -z "${1}${2}" ]]; then
|
||||
echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update"
|
||||
return
|
||||
fi
|
||||
|
||||
cat >! "${ZSH_CACHE_DIR}/.zsh-update" <<EOD
|
||||
LAST_EPOCH=$(current_epoch)
|
||||
EXIT_STATUS=${exit_status}
|
||||
ERROR='${error//\'/’}'
|
||||
EOD
|
||||
}
|
||||
|
||||
function update_ohmyzsh() {
|
||||
local verbose_mode
|
||||
zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default
|
||||
if ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then
|
||||
|
||||
if [[ "$update_mode" != background-alpha ]] \
|
||||
&& LANG= ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then
|
||||
update_last_updated_file
|
||||
return $?
|
||||
fi
|
||||
|
||||
local exit_status error
|
||||
if error=$(LANG= ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v silent 2>&1); then
|
||||
update_last_updated_file 0 "Update successful"
|
||||
else
|
||||
exit_status=$?
|
||||
update_last_updated_file $exit_status "$error"
|
||||
return $exit_status
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
@ -126,87 +151,145 @@ function has_typed_input() {
|
|||
}
|
||||
}
|
||||
|
||||
() {
|
||||
emulate -L zsh
|
||||
function handle_update() {
|
||||
() {
|
||||
emulate -L zsh
|
||||
|
||||
local epoch_target mtime option LAST_EPOCH
|
||||
local epoch_target mtime option LAST_EPOCH
|
||||
|
||||
# Remove lock directory if older than a day
|
||||
zmodload zsh/datetime
|
||||
zmodload -F zsh/stat b:zstat
|
||||
if mtime=$(zstat +mtime "$ZSH/log/update.lock" 2>/dev/null); then
|
||||
if (( (mtime + 3600 * 24) < EPOCHSECONDS )); then
|
||||
command rm -rf "$ZSH/log/update.lock"
|
||||
# Remove lock directory if older than a day
|
||||
zmodload zsh/datetime
|
||||
zmodload -F zsh/stat b:zstat
|
||||
if mtime=$(zstat +mtime "$ZSH/log/update.lock" 2>/dev/null); then
|
||||
if (( (mtime + 3600 * 24) < EPOCHSECONDS )); then
|
||||
command rm -rf "$ZSH/log/update.lock"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Check for lock directory
|
||||
if ! command mkdir "$ZSH/log/update.lock" 2>/dev/null; then
|
||||
return
|
||||
fi
|
||||
# Check for lock directory
|
||||
if ! command mkdir "$ZSH/log/update.lock" 2>/dev/null; then
|
||||
return
|
||||
fi
|
||||
|
||||
# Remove lock directory on exit. `return $ret` is important for when trapping a SIGINT:
|
||||
# The return status from the function is handled specially. If it is zero, the signal is
|
||||
# assumed to have been handled, and execution continues normally. Otherwise, the shell
|
||||
# will behave as interrupted except that the return status of the trap is retained.
|
||||
# This means that for a CTRL+C, the trap needs to return the same exit status so that
|
||||
# the shell actually exits what it's running.
|
||||
trap "
|
||||
ret=\$?
|
||||
unset update_mode
|
||||
unset -f current_epoch is_update_available update_last_updated_file update_ohmyzsh 2>/dev/null
|
||||
command rm -rf '$ZSH/log/update.lock'
|
||||
return \$ret
|
||||
" EXIT INT QUIT
|
||||
# Remove lock directory on exit. `return $ret` is important for when trapping a SIGINT:
|
||||
# The return status from the function is handled specially. If it is zero, the signal is
|
||||
# assumed to have been handled, and execution continues normally. Otherwise, the shell
|
||||
# will behave as interrupted except that the return status of the trap is retained.
|
||||
# This means that for a CTRL+C, the trap needs to return the same exit status so that
|
||||
# the shell actually exits what it's running.
|
||||
trap "
|
||||
ret=\$?
|
||||
unset update_mode
|
||||
unset -f current_epoch is_update_available update_last_updated_file update_ohmyzsh handle_update 2>/dev/null
|
||||
command rm -rf '$ZSH/log/update.lock'
|
||||
return \$ret
|
||||
" EXIT INT QUIT
|
||||
|
||||
# Create or update .zsh-update file if missing or malformed
|
||||
if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then
|
||||
update_last_updated_file
|
||||
return
|
||||
fi
|
||||
# Create or update .zsh-update file if missing or malformed
|
||||
if ! source "${ZSH_CACHE_DIR}/.zsh-update" 2>/dev/null || [[ -z "$LAST_EPOCH" ]]; then
|
||||
update_last_updated_file
|
||||
return
|
||||
fi
|
||||
|
||||
# Number of days before trying to update again
|
||||
zstyle -s ':omz:update' frequency epoch_target || epoch_target=${UPDATE_ZSH_DAYS:-13}
|
||||
# Test if enough time has passed until the next update
|
||||
if (( ( $(current_epoch) - $LAST_EPOCH ) < $epoch_target )); then
|
||||
return
|
||||
fi
|
||||
# Number of days before trying to update again
|
||||
zstyle -s ':omz:update' frequency epoch_target || epoch_target=${UPDATE_ZSH_DAYS:-13}
|
||||
# Test if enough time has passed until the next update
|
||||
if (( ( $(current_epoch) - $LAST_EPOCH ) < $epoch_target )); then
|
||||
return
|
||||
fi
|
||||
|
||||
# Test if Oh My Zsh directory is a git repository
|
||||
if ! (builtin cd -q "$ZSH" && LANG= git rev-parse &>/dev/null); then
|
||||
echo >&2 "[oh-my-zsh] Can't update: not a git repository."
|
||||
return
|
||||
fi
|
||||
# Test if Oh My Zsh directory is a git repository
|
||||
if ! (builtin cd -q "$ZSH" && LANG= git rev-parse &>/dev/null); then
|
||||
echo >&2 "[oh-my-zsh] Can't update: not a git repository."
|
||||
return
|
||||
fi
|
||||
|
||||
# Check if there are updates available before proceeding
|
||||
if ! is_update_available; then
|
||||
return
|
||||
fi
|
||||
# Check if there are updates available before proceeding
|
||||
if ! is_update_available; then
|
||||
update_last_updated_file
|
||||
return
|
||||
fi
|
||||
|
||||
# If in reminder mode or user has typed input, show reminder and exit
|
||||
if [[ "$update_mode" = reminder ]] || has_typed_input; then
|
||||
printf '\r\e[0K' # move cursor to first column and clear whole line
|
||||
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`"
|
||||
return 0
|
||||
fi
|
||||
# If in reminder mode or user has typed input, show reminder and exit
|
||||
if [[ "$update_mode" = reminder ]] || { [[ "$update_mode" != background-alpha ]] && has_typed_input }; then
|
||||
printf '\r\e[0K' # move cursor to first column and clear whole line
|
||||
echo "[oh-my-zsh] It's time to update! You can do that by running \`omz update\`"
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Don't ask for confirmation before updating if in auto mode
|
||||
if [[ "$update_mode" = auto ]]; then
|
||||
update_ohmyzsh
|
||||
return $?
|
||||
fi
|
||||
# Don't ask for confirmation before updating if in auto mode
|
||||
if [[ "$update_mode" = (auto|background-alpha) ]]; then
|
||||
update_ohmyzsh
|
||||
return $?
|
||||
fi
|
||||
|
||||
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
||||
# Otherwise just show a reminder for how to update
|
||||
echo -n "[oh-my-zsh] Would you like to update? [Y/n] "
|
||||
read -r -k 1 option
|
||||
[[ "$option" = $'\n' ]] || echo
|
||||
case "$option" in
|
||||
[yY$'\n']) update_ohmyzsh ;;
|
||||
[nN]) update_last_updated_file ;&
|
||||
*) echo "[oh-my-zsh] You can update manually by running \`omz update\`" ;;
|
||||
esac
|
||||
# Ask for confirmation and only update on 'y', 'Y' or Enter
|
||||
# Otherwise just show a reminder for how to update
|
||||
echo -n "[oh-my-zsh] Would you like to update? [Y/n] "
|
||||
read -r -k 1 option
|
||||
[[ "$option" = $'\n' ]] || echo
|
||||
case "$option" in
|
||||
[yY$'\n']) update_ohmyzsh ;;
|
||||
[nN]) update_last_updated_file ;&
|
||||
*) echo "[oh-my-zsh] You can update manually by running \`omz update\`" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
unset update_mode
|
||||
unset -f current_epoch is_update_available update_last_updated_file update_ohmyzsh handle_update
|
||||
}
|
||||
|
||||
unset update_mode
|
||||
unset -f current_epoch is_update_available update_last_updated_file update_ohmyzsh
|
||||
case "$update_mode" in
|
||||
background-alpha)
|
||||
autoload -Uz add-zsh-hook
|
||||
|
||||
_omz_bg_update() {
|
||||
# do the update in a subshell
|
||||
(handle_update) &|
|
||||
|
||||
# register update results function
|
||||
add-zsh-hook precmd _omz_bg_update_status
|
||||
|
||||
# deregister background function
|
||||
add-zsh-hook -d precmd _omz_bg_update
|
||||
unset -f _omz_bg_update
|
||||
}
|
||||
|
||||
_omz_bg_update_status() {
|
||||
{
|
||||
local LAST_EPOCH EXIT_STATUS ERROR
|
||||
if [[ ! -f "$ZSH_CACHE_DIR"/.zsh-update ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# check update results until timeout is reached
|
||||
. "$ZSH_CACHE_DIR/.zsh-update"
|
||||
if [[ -z "$EXIT_STATUS" || -z "$ERROR" ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [[ "$EXIT_STATUS" -eq 0 ]]; then
|
||||
print -P "\n%F{green}[oh-my-zsh] Update successful.%f"
|
||||
return 0
|
||||
elif [[ "$EXIT_STATUS" -ne 0 ]]; then
|
||||
print -P "\n%F{red}[oh-my-zsh] There was an error updating:%f"
|
||||
printf "\n${fg[yellow]}%s${reset_color}" "$ERROR"
|
||||
return 0
|
||||
fi
|
||||
} always {
|
||||
if (( TRY_BLOCK_ERROR == 0 )); then
|
||||
# if last update results have been handled, remove them from the status file
|
||||
update_last_updated_file
|
||||
|
||||
# deregister background function
|
||||
add-zsh-hook -d precmd _omz_bg_update_status
|
||||
unset -f _omz_bg_update_status
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
add-zsh-hook precmd _omz_bg_update
|
||||
;;
|
||||
*)
|
||||
handle_update ;;
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -63,7 +63,9 @@ zdot="${ZDOTDIR:-$HOME}"
|
|||
# Default value for $ZSH
|
||||
# a) if $ZDOTDIR is supplied and not $HOME: $ZDOTDIR/ohmyzsh
|
||||
# b) otherwise, $HOME/.oh-my-zsh
|
||||
[ "$ZDOTDIR" = "$HOME" ] || ZSH="${ZSH:-${ZDOTDIR:+$ZDOTDIR/ohmyzsh}}"
|
||||
if [ -n "$ZDOTDIR" ] && [ "$ZDOTDIR" != "$HOME" ]; then
|
||||
ZSH="${ZSH:-$ZDOTDIR/ohmyzsh}"
|
||||
fi
|
||||
ZSH="${ZSH:-$HOME/.oh-my-zsh}"
|
||||
|
||||
# Default settings
|
||||
|
|
@ -84,6 +86,10 @@ command_exists() {
|
|||
user_can_sudo() {
|
||||
# Check if sudo is installed
|
||||
command_exists sudo || return 1
|
||||
# Termux can't run sudo, so we can detect it and exit the function early.
|
||||
case "$PREFIX" in
|
||||
*com.termux*) return 1 ;;
|
||||
esac
|
||||
# The following command has 3 parts:
|
||||
#
|
||||
# 1. Run `sudo` with `-v`. Does the following:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
set +u # disable nounset
|
||||
|
||||
local ret=0 # exit code
|
||||
|
||||
# Protect against running with shells other than zsh
|
||||
if [ -z "$ZSH_VERSION" ]; then
|
||||
|
|
@ -181,17 +184,23 @@ fi
|
|||
# Update upstream remote to ohmyzsh org
|
||||
git remote -v | while read remote url extra; do
|
||||
case "$url" in
|
||||
https://github.com/robbyrussell/oh-my-zsh(|.git))
|
||||
git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git"
|
||||
break ;;
|
||||
git@github.com:robbyrussell/oh-my-zsh(|.git))
|
||||
git remote set-url "$remote" "git@github.com:ohmyzsh/ohmyzsh.git"
|
||||
break ;;
|
||||
# Update out-of-date "unauthenticated git protocol on port 9418" to https
|
||||
git://github.com/robbyrussell/oh-my-zsh(|.git))
|
||||
git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git"
|
||||
break ;;
|
||||
# Update out-of-date "unauthenticated git protocol on port 9418" to https
|
||||
git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git" ;;
|
||||
https://github.com/robbyrussell/oh-my-zsh(|.git))
|
||||
git remote set-url "$remote" "https://github.com/ohmyzsh/ohmyzsh.git" ;;
|
||||
git@github.com:robbyrussell/oh-my-zsh(|.git))
|
||||
git remote set-url "$remote" "git@github.com:ohmyzsh/ohmyzsh.git" ;;
|
||||
https://github.com/ohmyzsh/ohmyzsh(|.git)) ;;
|
||||
git@github.com:ohmyzsh/ohmyzsh(|.git)) ;;
|
||||
*) continue ;;
|
||||
esac
|
||||
|
||||
# If we reach this point we have found the proper ohmyzsh upstream remote. If we don't,
|
||||
# we'll only update from the set remote if `oh-my-zsh.remote` has been set to a remote,
|
||||
# as when installing from a fork.
|
||||
git config --local oh-my-zsh.remote "$remote"
|
||||
break
|
||||
done
|
||||
|
||||
# Set git-config values known to fix git errors
|
||||
|
|
@ -234,7 +243,7 @@ if LANG= git pull --quiet --rebase $remote $branch; then
|
|||
git config oh-my-zsh.lastVersion "$last_commit"
|
||||
|
||||
# Print changelog to the terminal
|
||||
if [[ interactive == true && $verbose_mode == default ]] ; then
|
||||
if [[ $interactive == true && $verbose_mode == default ]]; then
|
||||
"$ZSH/tools/changelog.sh" HEAD "$last_commit"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue