mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-30 02:44:42 +01:00
merge from upstream
This commit is contained in:
commit
64603fdc86
230 changed files with 5829 additions and 2392 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 #
|
||||
#############################
|
||||
|
|
@ -208,8 +294,14 @@ function display-release {
|
|||
local hash="${1:-$hash}"
|
||||
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" ;;
|
||||
text)
|
||||
local text="\e[33m$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)' "$hash" "$hash" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
|
@ -272,7 +364,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' <<< "$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
|
||||
|
|
|
|||
|
|
@ -21,10 +21,12 @@ 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.
|
||||
# - is not run from a tty
|
||||
# - git is unavailable on the system.
|
||||
if [[ "$update_mode" = disabled ]] \
|
||||
|| [[ ! -w "$ZSH" || ! -O "$ZSH" ]] \
|
||||
|| ! command -v git &>/dev/null; then
|
||||
|| [[ ! -t 1 ]] \
|
||||
|| ! command git --version 2>&1 >/dev/null; then
|
||||
unset update_mode
|
||||
return
|
||||
fi
|
||||
|
|
@ -65,7 +67,7 @@ function is_update_available() {
|
|||
local remote_head
|
||||
remote_head=$(
|
||||
if (( ${+commands[curl]} )); then
|
||||
curl -m 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
|
||||
curl --connect-timeout 2 -fsSL -H 'Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
|
||||
elif (( ${+commands[wget]} )); then
|
||||
wget -T 2 -O- --header='Accept: application/vnd.github.v3.sha' $api_url 2>/dev/null
|
||||
elif (( ${+commands[fetch]} )); then
|
||||
|
|
@ -93,7 +95,8 @@ function update_last_updated_file() {
|
|||
}
|
||||
|
||||
function update_ohmyzsh() {
|
||||
if ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" --interactive; then
|
||||
zstyle -s ':omz:update' verbose verbose_mode || verbose_mode=default
|
||||
if ZSH="$ZSH" zsh -f "$ZSH/tools/upgrade.sh" -i -v $verbose_mode; then
|
||||
update_last_updated_file
|
||||
fi
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,6 +16,9 @@
|
|||
# ZSH=~/.zsh sh install.sh
|
||||
#
|
||||
# Respects the following environment variables:
|
||||
# ZDOTDIR - path to Zsh dotfiles directory (default: unset). See [1][2]
|
||||
# [1] https://zsh.sourceforge.io/Doc/Release/Parameters.html#index-ZDOTDIR
|
||||
# [2] https://zsh.sourceforge.io/Doc/Release/Files.html#index-ZDOTDIR_002c-use-of
|
||||
# ZSH - path to the Oh My Zsh repository folder (default: $HOME/.oh-my-zsh)
|
||||
# REPO - name of the GitHub repo to install from (default: ohmyzsh/ohmyzsh)
|
||||
# REMOTE - full remote URL of the git repo to install (default: GitHub via HTTPS)
|
||||
|
|
@ -53,7 +56,14 @@ HOME="${HOME:-$(eval echo ~$USER)}"
|
|||
# Track if $ZSH was provided
|
||||
custom_zsh=${ZSH:+yes}
|
||||
|
||||
# Default settings
|
||||
# Use $zdot to keep track of where the directory is for zsh dotfiles
|
||||
# To check if $ZDOTDIR was provided, explicitly check for $ZDOTDIR
|
||||
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}}"
|
||||
ZSH="${ZSH:-$HOME/.oh-my-zsh}"
|
||||
REPO=${REPO:-snakewarhead/oh-my-zsh}
|
||||
REMOTE=${REMOTE:-https://github.com/${REPO}.git}
|
||||
|
|
@ -72,6 +82,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:
|
||||
|
|
@ -156,11 +170,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 +205,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 +287,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
|
||||
|
|
@ -305,11 +325,11 @@ setup_zshrc() {
|
|||
echo "${FMT_BLUE}Looking for an existing zsh config...${FMT_RESET}"
|
||||
|
||||
# Must use this exact name so uninstall.sh can find it
|
||||
OLD_ZSHRC=~/.zshrc.pre-oh-my-zsh
|
||||
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
|
||||
OLD_ZSHRC="$zdot/.zshrc.pre-oh-my-zsh"
|
||||
if [ -f "$zdot/.zshrc" ] || [ -h "$zdot/.zshrc" ]; then
|
||||
# Skip this if the user doesn't want to replace an existing .zshrc
|
||||
if [ "$KEEP_ZSHRC" = yes ]; then
|
||||
echo "${FMT_YELLOW}Found ~/.zshrc.${FMT_RESET} ${FMT_GREEN}Keeping...${FMT_RESET}"
|
||||
echo "${FMT_YELLOW}Found ${zdot}/.zshrc.${FMT_RESET} ${FMT_GREEN}Keeping...${FMT_RESET}"
|
||||
return
|
||||
fi
|
||||
if [ -e "$OLD_ZSHRC" ]; then
|
||||
|
|
@ -321,19 +341,24 @@ setup_zshrc() {
|
|||
fi
|
||||
mv "$OLD_ZSHRC" "${OLD_OLD_ZSHRC}"
|
||||
|
||||
echo "${FMT_YELLOW}Found old ~/.zshrc.pre-oh-my-zsh." \
|
||||
echo "${FMT_YELLOW}Found old .zshrc.pre-oh-my-zsh." \
|
||||
"${FMT_GREEN}Backing up to ${OLD_OLD_ZSHRC}${FMT_RESET}"
|
||||
fi
|
||||
echo "${FMT_YELLOW}Found ~/.zshrc.${FMT_RESET} ${FMT_GREEN}Backing up to ${OLD_ZSHRC}${FMT_RESET}"
|
||||
mv ~/.zshrc "$OLD_ZSHRC"
|
||||
echo "${FMT_YELLOW}Found ${zdot}/.zshrc.${FMT_RESET} ${FMT_GREEN}Backing up to ${OLD_ZSHRC}${FMT_RESET}"
|
||||
mv "$zdot/.zshrc" "$OLD_ZSHRC"
|
||||
fi
|
||||
|
||||
echo "${FMT_GREEN}Using the Oh My Zsh template file and adding it to ~/.zshrc.${FMT_RESET}"
|
||||
echo "${FMT_GREEN}Using the Oh My Zsh template file and adding it to $zdot/.zshrc.${FMT_RESET}"
|
||||
|
||||
# Replace $HOME path with '$HOME' in $ZSH variable in .zshrc file
|
||||
omz=$(echo "$ZSH" | sed "s|^$HOME/|\$HOME/|")
|
||||
sed "s|^export ZSH=.*$|export ZSH=\"${omz}\"|" "$ZSH/templates/zshrc.zsh-template" > ~/.zshrc-omztemp
|
||||
mv -f ~/.zshrc-omztemp ~/.zshrc
|
||||
# Modify $ZSH variable in .zshrc directory to use the literal $ZDOTDIR or $HOME
|
||||
omz="$ZSH"
|
||||
if [ -n "$ZDOTDIR" ] && [ "$ZDOTDIR" != "$HOME" ]; then
|
||||
omz=$(echo "$omz" | sed "s|^$ZDOTDIR/|\$ZDOTDIR/|")
|
||||
fi
|
||||
omz=$(echo "$omz" | sed "s|^$HOME/|\$HOME/|")
|
||||
|
||||
sed "s|^export ZSH=.*$|export ZSH=\"${omz}\"|" "$ZSH/templates/zshrc.zsh-template" > "$zdot/.zshrc-omztemp"
|
||||
mv -f "$zdot/.zshrc-omztemp" "$zdot/.zshrc"
|
||||
|
||||
# create ~/.zshrc_custom
|
||||
touch ~/.zshrc_custom
|
||||
|
|
@ -404,9 +429,9 @@ EOF
|
|||
|
||||
# We're going to change the default shell, so back up the current one
|
||||
if [ -n "$SHELL" ]; then
|
||||
echo "$SHELL" > ~/.shell.pre-oh-my-zsh
|
||||
echo "$SHELL" > "$zdot/.shell.pre-oh-my-zsh"
|
||||
else
|
||||
grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > ~/.shell.pre-oh-my-zsh
|
||||
grep "^$USER:" /etc/passwd | awk -F: '{print $7}' > "$zdot/.shell.pre-oh-my-zsh"
|
||||
fi
|
||||
|
||||
echo "Changing your shell to $zsh..."
|
||||
|
|
@ -448,7 +473,7 @@ print_success() {
|
|||
printf '\n'
|
||||
printf '\n'
|
||||
printf "%s %s %s\n" "Before you scream ${FMT_BOLD}${FMT_YELLOW}Oh My Zsh!${FMT_RESET} look over the" \
|
||||
"$(fmt_code "$(fmt_link ".zshrc" "file://$HOME/.zshrc" --text)")" \
|
||||
"$(fmt_code "$(fmt_link ".zshrc" "file://$zdot/.zshrc" --text)")" \
|
||||
"file to select plugins, themes, and options."
|
||||
printf '\n'
|
||||
printf '%s\n' "• Follow us on Twitter: $(fmt_link @ohmyzsh https://twitter.com/ohmyzsh)"
|
||||
|
|
@ -503,6 +528,11 @@ EOF
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Create ZDOTDIR folder structure if it doesn't exist
|
||||
if [ -n "$ZDOTDIR" ]; then
|
||||
mkdir -p "$ZDOTDIR"
|
||||
fi
|
||||
|
||||
setup_ohmyzsh
|
||||
setup_zshrc
|
||||
setup_shell
|
||||
|
|
|
|||
|
|
@ -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 ]
|
||||
|
|
|
|||
|
|
@ -1,3 +1,15 @@
|
|||
if hash chsh >/dev/null 2>&1 && [ -f ~/.shell.pre-oh-my-zsh ]; then
|
||||
old_shell=$(cat ~/.shell.pre-oh-my-zsh)
|
||||
echo "Switching your shell back to '$old_shell':"
|
||||
if chsh -s "$old_shell"; then
|
||||
rm -f ~/.shell.pre-oh-my-zsh
|
||||
else
|
||||
echo "Could not change default shell. Change it manually by running chsh"
|
||||
echo "or editing the /etc/passwd file."
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
|
||||
read -r -p "Are you sure you want to remove Oh My Zsh? [y/N] " confirmation
|
||||
if [ "$confirmation" != y ] && [ "$confirmation" != Y ]; then
|
||||
echo "Uninstall cancelled"
|
||||
|
|
@ -25,16 +37,5 @@ else
|
|||
echo "No original zsh config found"
|
||||
fi
|
||||
|
||||
if hash chsh >/dev/null 2>&1 && [ -f ~/.shell.pre-oh-my-zsh ]; then
|
||||
old_shell=$(cat ~/.shell.pre-oh-my-zsh)
|
||||
echo "Switching your shell back to '$old_shell':"
|
||||
if chsh -s "$old_shell"; then
|
||||
rm -f ~/.shell.pre-oh-my-zsh
|
||||
else
|
||||
echo "Could not change default shell. Change it manually by running chsh"
|
||||
echo "or editing the /etc/passwd file."
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Thanks for trying out Oh My Zsh. It's been uninstalled."
|
||||
echo "Don't forget to restart your terminal!"
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
local ret=0 # exit code
|
||||
|
||||
# Protect against running with shells other than zsh
|
||||
if [ -z "$ZSH_VERSION" ]; then
|
||||
exec zsh "$0" "$@"
|
||||
|
|
@ -12,6 +14,23 @@ esac
|
|||
|
||||
cd "$ZSH"
|
||||
|
||||
verbose_mode="default"
|
||||
interactive=false
|
||||
|
||||
while getopts "v:i" opt; do
|
||||
case $opt in
|
||||
v)
|
||||
if [[ $OPTARG == default || $OPTARG == minimal || $OPTARG == silent ]]; then
|
||||
verbose_mode=$OPTARG
|
||||
else
|
||||
echo "[oh-my-zsh] update verbosity '$OPTARG' is not valid"
|
||||
echo "[oh-my-zsh] valid options are 'default', 'minimal' and 'silent'"
|
||||
fi
|
||||
;;
|
||||
i) interactive=true ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Use colors, but only if connected to a terminal
|
||||
# and that terminal supports them.
|
||||
|
||||
|
|
@ -78,11 +97,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 +132,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
|
||||
|
||||
|
|
@ -197,7 +222,9 @@ git checkout -q "$branch" -- || exit 1
|
|||
last_commit=$(git rev-parse "$branch")
|
||||
|
||||
# Update Oh My Zsh
|
||||
printf "${BLUE}%s${RESET}\n" "Updating Oh My Zsh"
|
||||
if [[ $verbose_mode != silent ]]; then
|
||||
printf "${BLUE}%s${RESET}\n" "Updating Oh My Zsh"
|
||||
fi
|
||||
if LANG= git pull --quiet --rebase $remote $branch; then
|
||||
# Check if it was really updated or not
|
||||
if [[ "$(git rev-parse HEAD)" = "$last_commit" ]]; then
|
||||
|
|
@ -209,24 +236,30 @@ if LANG= git pull --quiet --rebase $remote $branch; then
|
|||
git config oh-my-zsh.lastVersion "$last_commit"
|
||||
|
||||
# Print changelog to the terminal
|
||||
if [[ "$1" = --interactive ]]; then
|
||||
if [[ $interactive == true && $verbose_mode == default ]]; then
|
||||
"$ZSH/tools/changelog.sh" HEAD "$last_commit"
|
||||
fi
|
||||
|
||||
printf "${BLUE}%s \`${BOLD}%s${RESET}${BLUE}\`${RESET}\n" "You can see the changelog with" "omz changelog"
|
||||
if [[ $verbose_mode != silent ]]; then
|
||||
printf "${BLUE}%s \`${BOLD}%s${RESET}${BLUE}\`${RESET}\n" "You can see the changelog with" "omz changelog"
|
||||
fi
|
||||
fi
|
||||
|
||||
printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET
|
||||
printf '%s ____ %s/ /_ %s ____ ___ %s__ __ %s ____ %s_____%s/ /_ %s\n' $RAINBOW $RESET
|
||||
printf '%s / __ \\%s/ __ \\ %s / __ `__ \\%s/ / / / %s /_ / %s/ ___/%s __ \\ %s\n' $RAINBOW $RESET
|
||||
printf '%s/ /_/ /%s / / / %s / / / / / /%s /_/ / %s / /_%s(__ )%s / / / %s\n' $RAINBOW $RESET
|
||||
printf '%s\\____/%s_/ /_/ %s /_/ /_/ /_/%s\\__, / %s /___/%s____/%s_/ /_/ %s\n' $RAINBOW $RESET
|
||||
printf '%s %s %s %s /____/ %s %s %s %s\n' $RAINBOW $RESET
|
||||
printf '\n'
|
||||
printf "${BLUE}%s${RESET}\n\n" "$message"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on Twitter:" "$(fmt_link @ohmyzsh https://twitter.com/ohmyzsh)"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
||||
if [[ $verbose_mode == default ]]; then
|
||||
printf '%s %s__ %s %s %s %s %s__ %s\n' $RAINBOW $RESET
|
||||
printf '%s ____ %s/ /_ %s ____ ___ %s__ __ %s ____ %s_____%s/ /_ %s\n' $RAINBOW $RESET
|
||||
printf '%s / __ \\%s/ __ \\ %s / __ `__ \\%s/ / / / %s /_ / %s/ ___/%s __ \\ %s\n' $RAINBOW $RESET
|
||||
printf '%s/ /_/ /%s / / / %s / / / / / /%s /_/ / %s / /_%s(__ )%s / / / %s\n' $RAINBOW $RESET
|
||||
printf '%s\\____/%s_/ /_/ %s /_/ /_/ /_/%s\\__, / %s /___/%s____/%s_/ /_/ %s\n' $RAINBOW $RESET
|
||||
printf '%s %s %s %s /____/ %s %s %s %s\n' $RAINBOW $RESET
|
||||
printf '\n'
|
||||
printf "${BLUE}%s${RESET}\n\n" "$message"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "To keep up with the latest news and updates, follow us on Twitter:" "$(fmt_link @ohmyzsh https://twitter.com/ohmyzsh)"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Want to get involved in the community? Join our Discord:" "$(fmt_link "Discord server" https://discord.gg/ohmyzsh)"
|
||||
printf "${BLUE}${BOLD}%s %s${RESET}\n" "Get your Oh My Zsh swag at:" "$(fmt_link "Planet Argon Shop" https://shop.planetargon.com/collections/oh-my-zsh)"
|
||||
elif [[ $verbose_mode == minimal ]]; then
|
||||
printf "${BLUE}%s${RESET}\n" "$message"
|
||||
fi
|
||||
else
|
||||
ret=$?
|
||||
printf "${RED}%s${RESET}\n" 'There was an error updating. Try again later?'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue