From 91d647269f69f7357b0dafa0ce050003edfb1e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 13 Dec 2020 20:26:37 +0100 Subject: [PATCH] Document how to update OMZ from a script --- FAQ.md | 11 +++++++++++ Home.md | 24 ++++++++++++------------ 2 files changed, 23 insertions(+), 12 deletions(-) diff --git a/FAQ.md b/FAQ.md index 4d1b880..1d132ae 100644 --- a/FAQ.md +++ b/FAQ.md @@ -14,6 +14,7 @@ _If you don't find what you're looking for, and you think it should be covered b - [How do I change my locale?](#how-do-i-change-my-locale) - [How do I reload the zshrc file?](#how-do-i-reload-the-zshrc-file) - [How do I reset the completion cache?](#how-do-i-reset-the-completion-cache) + - [How do I manually update Oh My Zsh from a script?](#how-do-i-manually-update-oh-my-zsh-from-a-script) - [COMMON PROBLEMS](#common-problems) - [Font issues](#font-issues) - [I have a weird character in my prompt](#i-have-a-weird-character-in-my-prompt) @@ -143,6 +144,16 @@ rm "$ZSH_COMPDUMP" exec zsh ``` +#### How do I manually update Oh My Zsh from a script? + +The best way to do that is to call the `upgrade.sh` script directly. If `$ZSH` is defined (it should point to where OMZ is installed), then you can call it like so: + +```sh +"$ZSH/tools/upgrade.sh" +``` + +Another option is to use the `omz` CLI. The `omz update` command triggers an update, but it also shows the changelog and restarts the zsh session (which _might_ cause a restart loop). To avoid that, run it with the `--unattended` flag, like so: `omz update --unattended`. But again, it's better to call the `upgrade.sh` script directly. + ## COMMON PROBLEMS ### Font issues diff --git a/Home.md b/Home.md index 3578a03..a36a989 100644 --- a/Home.md +++ b/Home.md @@ -1,6 +1,6 @@ ## Welcome to the Oh My Zsh wiki -- If you don't have zsh installed, see [[Installing Zsh]]. +- If you don't have zsh installed, see [[Installing Zsh]]. - Once you have zsh, you can install Oh My Zsh, by simply running one of these commands: | Method | Command | @@ -9,19 +9,19 @@ | **wget** | `sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` | | **fetch** | `sh -c "$(fetch -o - https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"` | -- Once installed, take a look at our [[Themes]] and [[Plugins]] (here's a brief overview: [[Plugins Overview]]). -- You can find more at [[External themes]] and [[External plugins]]. -- Learn about [[Customization]]. -- Having problems? Check out the [[FAQ]] for common problems, or the [[Troubleshooting]] page for instructions on how to diagnose the issue. -- And don't forget to [follow us on twitter](http://twitter.com/ohmyzsh)! +- Once installed, take a look at our [[Themes]] and [[Plugins]] (here's a brief overview: [[Plugins Overview]]). +- You can find more at [[External themes]] and [[External plugins]]. +- Learn about [[Customization]]. +- Having problems? Check out the [[FAQ]] for common problems, or the [[Troubleshooting]] page for instructions on how to diagnose the issue. +- And don't forget to [follow us on twitter](http://twitter.com/ohmyzsh)! -## Help Wanted +## Help Wanted -- Help us build the [[Cheatsheet]] -- Want to contribute? Check out our [[Code Style Guide]] and [[Design]] guidelines and start hacking away! -- We need [[Volunteers]] +- Help us build the [[Cheatsheet]] +- Want to contribute? Check out our [[Code Style Guide]] and [[Design]] guidelines and start hacking away! +- We need [[Volunteers]] -## Community +## Community -- Read our user [[Testimonials]]. +- Read our user [[Testimonials]]. - [[Articles]] Have you written a blog post/article that mentions Oh My Zsh?