mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-12 15:34:50 +08:00
Compare commits
3 Commits
6152ac30be
...
ce28ac42c8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce28ac42c8 | ||
|
|
97cf0bf4bd | ||
|
|
48b98b957e |
@ -19,13 +19,13 @@ function current_epoch() {
|
||||
echo $(( EPOCHSECONDS / 60 / 60 / 24 ))
|
||||
}
|
||||
|
||||
function update_last-updated_file() {
|
||||
function update_last_updated_file() {
|
||||
echo "LAST_EPOCH=$(current_epoch)" >! "${ZSH_CACHE_DIR}/.zsh-update"
|
||||
}
|
||||
|
||||
function update_ohmyzsh() {
|
||||
ZSH="$ZSH" sh "$ZSH/tools/upgrade.sh"
|
||||
update_last-updated_file
|
||||
update_last_updated_file
|
||||
}
|
||||
|
||||
() {
|
||||
@ -55,7 +55,7 @@ function update_ohmyzsh() {
|
||||
|
||||
# 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
|
||||
update_last_updated_file
|
||||
return
|
||||
fi
|
||||
|
||||
@ -79,10 +79,10 @@ function update_ohmyzsh() {
|
||||
read -r -k 1 option
|
||||
[[ "$option" != $'\n' ]] && echo
|
||||
case "$option" in
|
||||
[nN]) update_last-updated_file ;;
|
||||
*) update_ohmyzsh ;;
|
||||
[yY$'\n']) update_ohmyzsh ;;
|
||||
[nN]) update_last_updated_file ;;
|
||||
esac
|
||||
fi
|
||||
}
|
||||
|
||||
unset -f current_epoch update_last-updated_file update_ohmyzsh
|
||||
unset -f current_epoch update_last_updated_file update_ohmyzsh
|
||||
|
||||
@ -269,11 +269,11 @@ main() {
|
||||
/____/ ....is now installed!
|
||||
|
||||
|
||||
Please look over the ~/.zshrc file to select plugins, themes, and options.
|
||||
Before your scream Oh My Zsh! please look over the ~/.zshrc file to select plugins, themes, and options.
|
||||
|
||||
p.s. Follow us on https://twitter.com/ohmyzsh
|
||||
|
||||
p.p.s. Get stickers, shirts, and coffee mugs at https://shop.planetargon.com/collections/oh-my-zsh
|
||||
• Follow us on Twitter: https://twitter.com/ohmyzsh
|
||||
• Join our Discord server: https://discord.gg/ohmyzsh
|
||||
• Get stickers, shirts, coffee mugs and other swag: https://shop.planetargon.com/collections/oh-my-zsh
|
||||
|
||||
EOF
|
||||
printf "$RESET"
|
||||
|
||||
@ -62,7 +62,8 @@ then
|
||||
printf '%s\____/%s_/ /_/ %s /_/ /_/ /_/%s\__, / %s /___/%s____/%s_/ /_/ %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
|
||||
printf '%s %s %s %s /____/ %s %s %s %s\n' $RB_RED $RB_ORANGE $RB_YELLOW $RB_GREEN $RB_BLUE $RB_INDIGO $RB_VIOLET $RB_RESET
|
||||
printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version."
|
||||
printf "${BLUE}${BOLD}%s${RESET}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh"
|
||||
printf "${BLUE}${BOLD}%s${RESET}\n" "To keep up on the latest news and updates, follow us on Twitter: https://twitter.com/ohmyzsh"
|
||||
printf "${BLUE}${BOLD}%s${RESET}\n" "Want to get involved in the community? Join our Discord: https://discord.gg/ohmyzsh"
|
||||
printf "${BLUE}${BOLD}%s${RESET}\n" "Get your Oh My Zsh swag at: https://shop.planetargon.com/collections/oh-my-zsh"
|
||||
else
|
||||
printf "${RED}%s${RESET}\n" 'There was an error updating. Try again later?'
|
||||
|
||||
Loading…
Reference in New Issue
Block a user