Skip to content

Commit

Permalink
docs: add upgrade section
Browse files Browse the repository at this point in the history
resolves #5452
  • Loading branch information
JanDeDobbeleer committed Sep 8, 2024
1 parent f6b5be8 commit cb2dd07
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 5 deletions.
3 changes: 2 additions & 1 deletion website/docs/configuration/general.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
8 changes: 4 additions & 4 deletions website/docs/installation/customize.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions website/docs/installation/upgrade.mdx
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions website/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = {
"installation/fonts",
"installation/prompt",
"installation/customize",
"installation/upgrade",
],
},
],
Expand Down

0 comments on commit cb2dd07

Please sign in to comment.