docs: tweak tips, cautions and warnings

This commit is contained in:
L. Yeung 2022-08-10 14:42:18 +08:00 committed by Jan De Dobbeleer
parent b19316a0ee
commit 2eceffc91b
12 changed files with 13 additions and 14 deletions

View file

@ -114,7 +114,7 @@ do so like this:
"template": " {{ if .Segments.Git.UpstreamGone }}\uf7d3{{ else if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} " "template": " {{ if .Segments.Git.UpstreamGone }}\uf7d3{{ else if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} "
``` ```
:::warning :::caution
For this to work, the segment you refer to needs to be in your config. The above example won't work if For this to work, the segment you refer to needs to be in your config. The above example won't work if
your config does not contain a git segment as Oh My Posh only populates the properties when it needs to. your config does not contain a git segment as Oh My Posh only populates the properties when it needs to.
::: :::

View file

@ -102,7 +102,7 @@ do so like this:
"template": " {{ if .Segments.Git.UpstreamGone }}\uf7d3{{ else if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} " "template": " {{ if .Segments.Git.UpstreamGone }}\uf7d3{{ else if gt .Code 0 }}\uf00d{{ else }}\uf00c{{ end }} "
``` ```
:::warning :::caution
For this to work, the segment you refer to needs to be in your config. The above example won't work if For this to work, the segment you refer to needs to be in your config. The above example won't work if
your config does not contain a git segment as Oh My Posh only populates the properties when it needs to. your config does not contain a git segment as Oh My Posh only populates the properties when it needs to.
::: :::

View file

@ -135,7 +135,7 @@ Once altered, reload your config for the changes to take effect.
</TabItem> </TabItem>
<TabItem value="nu"> <TabItem value="nu">
:::warning :::caution
Oh My Posh requires Nushell >= 0.60.0 Oh My Posh requires Nushell >= 0.60.0
::: :::

View file

@ -15,7 +15,7 @@ To see the icons displayed in Oh My Posh, **install** a [Nerd Font][nerdfonts],
Oh My Posh has a CLI to help you select and install a [Nerd Font][nerdfonts] (beta): Oh My Posh has a CLI to help you select and install a [Nerd Font][nerdfonts] (beta):
:::warning Windows :::caution Windows
This command needs to be executed as admin. The fonts are installed system wide. This command needs to be executed as admin. The fonts are installed system wide.
::: :::

View file

@ -49,7 +49,7 @@ Then add the following line.
oh-my-posh init pwsh | Invoke-Expression oh-my-posh init pwsh | Invoke-Expression
``` ```
:::warning Antivirus software :::tip Antivirus software
If adding an exception to your Antivirus software still blocks Oh My Posh for Windows, you can try using the below If adding an exception to your Antivirus software still blocks Oh My Posh for Windows, you can try using the below
alternate line in your PowerShell profile. This is a drop-in replacement to the above call with Invoke-Expression. alternate line in your PowerShell profile. This is a drop-in replacement to the above call with Invoke-Expression.
Tested with PowerShell 7.2.4 with Bitdefender Antivirus installed and requires NO exceptions for oh-my-posh.exe. Tested with PowerShell 7.2.4 with Bitdefender Antivirus installed and requires NO exceptions for oh-my-posh.exe.
@ -76,7 +76,7 @@ your cmd experience. Follow the installation instructions and make sure you sele
Integrating Oh My Posh with Clink is easy: create a new file called oh-my-posh.lua in your Clink Integrating Oh My Posh with Clink is easy: create a new file called oh-my-posh.lua in your Clink
scripts directory (run `clink info` inside cmd to find that file's location). scripts directory (run `clink info` inside cmd to find that file's location).
:::warning :::caution
Use the full path to the config file, not the relative path. Use the full path to the config file, not the relative path.
::: :::
@ -156,7 +156,7 @@ exec fish
</TabItem> </TabItem>
<TabItem value="nu"> <TabItem value="nu">
:::warning :::caution
Oh My Posh requires Nushell >= 0.60.0 Oh My Posh requires Nushell >= 0.60.0
::: :::

View file

@ -74,7 +74,7 @@ This installs a couple of things:
For the `PATH` to be reloaded, a restart of your terminal is advised. For the `PATH` to be reloaded, a restart of your terminal is advised.
:::warning Antivirus software :::tip Antivirus software
Due to frequent updates of Oh My Posh, Antivirus software occasionally flags it (false positive). Due to frequent updates of Oh My Posh, Antivirus software occasionally flags it (false positive).
To ensure Oh My Posh isn't blocked you can either report it to your favorite Antivirus software as false positive To ensure Oh My Posh isn't blocked you can either report it to your favorite Antivirus software as false positive
(e.g. [Report a false positive/negative to Microsoft for analysis][report-false-positive]) or create an exclusion for it. (e.g. [Report a false positive/negative to Microsoft for analysis][report-false-positive]) or create an exclusion for it.

View file

@ -7,7 +7,7 @@ sidebar_label: Battery
## What ## What
:::caution :::caution
The segment is not supported and automatically disabled on windows when WSL 1 is detected. Works fine with WSL 2. The segment is not supported and automatically disabled on Windows when WSL 1 is detected. Works fine with WSL 2.
::: :::
Battery displays the remaining power percentage for your battery. Battery displays the remaining power percentage for your battery.

View file

@ -22,7 +22,7 @@ To enable this, set `$env:POSH_GIT_ENABLED = $true` in your `$PROFILE`. Be aware
twice, so in case you're having a slow repository, it's better to migrate to the [Posh-Git segment][poshgit]. twice, so in case you're having a slow repository, it's better to migrate to the [Posh-Git segment][poshgit].
::: :::
:::warning :::caution
Starting from version 3.152.0, `display_status` is disabled by default. Starting from version 3.152.0, `display_status` is disabled by default.
It improves performance but reduces the quantity of information. Don't forget to enable it in your theme if needed. It improves performance but reduces the quantity of information. Don't forget to enable it in your theme if needed.
An alternative is to use the [Posh-Git segment][poshgit]. An alternative is to use the [Posh-Git segment][poshgit].

View file

@ -8,7 +8,7 @@ sidebar_label: Nbgv
Display the [Nerdbank.GitVersioning][nbgv] version. Display the [Nerdbank.GitVersioning][nbgv] version.
:::warning :::caution
The Nerdbank.GitVersioning CLI can be a bit slow causing the prompt to feel slow. The Nerdbank.GitVersioning CLI can be a bit slow causing the prompt to feel slow.
::: :::

View file

@ -9,7 +9,6 @@ sidebar_label: Open Weather Map
Shows the current weather of a given location with [Open Weather Map][owm]. Shows the current weather of a given location with [Open Weather Map][owm].
:::caution :::caution
You **must** request an API key at the [Open Weather Map][owm-price] website. You **must** request an API key at the [Open Weather Map][owm-price] website.
The free tier for *Current weather and forecasts collection* is sufficient. The free tier for *Current weather and forecasts collection* is sufficient.
::: :::

View file

@ -9,7 +9,7 @@ sidebar_label: Terraform
Display the currently active Terraform Workspace name. Display the currently active Terraform Workspace name.
:::caution :::caution
This requires a terraform binary in your PATH and will only show in directories that contain a `.terraform` subdirectory This requires a terraform binary in your PATH and will only show in directories that contain a `.terraform` subdirectory.
::: :::
## Sample Configuration ## Sample Configuration

View file

@ -7,7 +7,7 @@ sidebar_label: 📸 Share theme
You can export your prompt to an image which you can share online. You have the ability to align You can export your prompt to an image which you can share online. You have the ability to align
it correctly and add your name for credits too. it correctly and add your name for credits too.
:::warning :::caution
Some glyphs aren't rendered correctly, that's not you but the limitations of the renderer. Some glyphs aren't rendered correctly, that's not you but the limitations of the renderer.
Depending on your config, you might have to tweak the output a little bit. Depending on your config, you might have to tweak the output a little bit.
::: :::