docs: add upgrade section
Some checks failed
Code QL / code-ql (push) Waiting to run
Release / changelog (push) Waiting to run
Release / artifacts (push) Blocked by required conditions
Azure Static Web Apps CI/CD / Build and Deploy (push) Has been cancelled

resolves #5452
This commit is contained in:
Jan De Dobbeleer 2024-09-08 11:21:51 +02:00 committed by Jan De Dobbeleer
parent f6b5be8a65
commit cb2dd07b19
4 changed files with 37 additions and 5 deletions

View file

@ -137,7 +137,7 @@ For example, the following is a valid `--config` flag:
| `enable_cursor_positioning` | `boolean` | `false` | enable fetching the cursor position in bash and zsh to allow automatic hiding of leading newlines when at the top of the shell |
| `patch_pwsh_bleed` | `boolean` | `false` | patch a PowerShell bug where the background colors bleed into the next line at the end of the buffer (can be removed when [this][pwsh-bleed] is merged) |
| `disable_notice` | `boolean` | `false` | disables the notice that a new upgrade is available when `auto_upgrade` is disabled |
| `auto_upgrade` | `boolean` | `false` | enable automatic upgrades for Oh My Posh (supports Windows, macOS and Linux) |
| `auto_upgrade` | `boolean` | `false` | enable [automatic upgrades][upgrade] for Oh My Posh (supports Windows, macOS and Linux) |
| `iterm_features` | `[]string` | `false` | enable iTerm2 specific features:<ul><li>`prompt_mark`: add the `iterm2_prompt_mark` [function][iterm2-si] for supported shells</li><li>`current_dir`: expose the current directory for iTerm2</li><li>`remote_host`: expose the current remote and user for iTerm2</li></ul> |
### JSON Schema Validation
@ -194,3 +194,4 @@ Converters won't catch this change, so you will need to adjust manually.
[templates]: /docs/configuration/templates#config-variables
[pwsh-bleed]: https://github.com/PowerShell/PowerShell/pull/19019
[iterm2-si]: https://iterm2.com/documentation-shell-integration.html
[upgrade]: /docs/installation/upgrade#automatic

View file

@ -28,7 +28,7 @@ There are two possible values the `--config` flag can handle:
--config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/jandedobbeleer.omp.json'
```
### Shell syntax
### Set the configuration
The example below use a local path to the [jandedobbeleer][jandedobbeleer] theme, adjust the `--config` value
to reflect your configuration file, local or remote.
@ -237,7 +237,7 @@ Windows user's home folder.
Inside the WSL, you can find your Windows user's home folder here: `/mnt/c/Users/<WINDOWSUSERNAME>`.
:::
### Get inspiration
### Themes
The Windows and homebrew installers also bundle the **predefined configurations** ([themes][themes]). You can use the
following way to reference them directly. This will keep them up-to-date and compatible with future updates.
@ -271,14 +271,14 @@ eval "$(oh-my-posh init zsh --config $(brew --prefix oh-my-posh)/themes/jandedob
</TabItem>
</Tabs>
### Adjust a theme
### Custom configuration
Maybe there's a theme you like, but you don't fancy the colors. Or, maybe there's a segment you
want to tweak/add, or replace some of the icons with a different one. Whatever the case, **read through
available options first**, by starting with the [configuration][configuration].
You can export the current theme (default, or set via `--config`) to the format you like (`json`, `yaml`, or `toml`)
which can be used to tweak and store as your own custom theme.
which can be used to tweak and store as your own custom configuration.
```bash
oh-my-posh config export --output ~/.mytheme.omp.json

View file

@ -0,0 +1,30 @@
---
id: upgrade
title: Upgrade
sidebar_label: ♻️ Upgrade
---
## Manual
While you can always follow the upgrade steps listed under the installation section,
you can also use the `upgrade` command to update Oh My Posh to the latest version.
```powershell
oh-my-posh upgrade
```
## Automatic
In case you want to enable auto-upgrades, you need to edit your configuration file.
If you don't yet have a configuration file, have a look at the [customize page][customize] to get started,
afterwards you can add the following line to your configuration file:
import Config from "@site/src/components/Config.js";
<Config
data={{
"auto_upgrade": true
}}
/>
[customize]: /docs/installation/customize#custom-configuration

View file

@ -24,6 +24,7 @@ module.exports = {
"installation/fonts",
"installation/prompt",
"installation/customize",
"installation/upgrade",
],
},
],