docs: revise some details

This commit is contained in:
L. Yeung 2022-05-09 00:17:13 +08:00 committed by Jan De Dobbeleer
parent f67dd52f47
commit c742bff144
7 changed files with 17 additions and 17 deletions

8
.vscode/launch.json vendored
View file

@ -13,7 +13,7 @@
"primary", "primary",
"--config=${workspaceRoot}/themes/default.omp.json", "--config=${workspaceRoot}/themes/default.omp.json",
"--shell=pwsh", "--shell=pwsh",
"--terminal-width=200", "--terminal-width=200"
] ]
}, },
{ {
@ -106,7 +106,7 @@
"args": [ "args": [
"config", "config",
"migrate", "migrate",
"--config=${workspaceRoot}/themes/default.omp.json", "--config=${workspaceRoot}/themes/default.omp.json"
] ]
}, },
{ {
@ -131,8 +131,8 @@
"mode": "debug", "mode": "debug",
"program": "${workspaceRoot}/src", "program": "${workspaceRoot}/src",
"args": [ "args": [
"cache", "cache"
] ]
}, }
] ]
} }

View file

@ -17,12 +17,12 @@ What a week its been! Oh My Posh turned 6 years old and we dropped a ton of s
## Swag ## Swag
After seeing Scott Hanselman wear his oh my zsh shirt while we got to talk about After seeing Scott Hanselman wear his oh my zsh shirt while we got to talk about
Oh My posh on [Windows Wednesdays] [windows-wednesdays], I got the sudden urge to expand his wardrobe. Oh My Posh on [Windows Wednesdays] [windows-wednesdays], I got the sudden urge to expand his wardrobe.
<iframe class="youtube" src="https://www.youtube.com/embed/uO_F5W2LbSk" frameborder="0" allowfullscreen></iframe> <iframe class="youtube" src="https://www.youtube.com/embed/uO_F5W2LbSk" frameborder="0" allowfullscreen></iframe>
And so, we did. Got in touch with [Marc Duiker][marc] and we got to work. The result? A ton of new goodies. And so, we did. Got in touch with [Marc Duiker][marc] and we got to work. The result? A ton of new goodies.
Consider this to be **the first artist series** for Oh My posh, a way to also highlight some talented Consider this to be **the first artist series** for Oh My Posh, a way to also highlight some talented
people in the community. All profits go to the development of the project and artists also get a 20% royalty people in the community. All profits go to the development of the project and artists also get a 20% royalty
per item sold. If you know any interesting artists to work with for the next batch, be sure to let me know! per item sold. If you know any interesting artists to work with for the next batch, be sure to let me know!
@ -35,12 +35,12 @@ So, what are you waiting for? Get some!
### CLI interface ### CLI interface
Something I've been sleeping on for a long time, Oh My posh finally has a new CLI interface. Something I've been sleeping on for a long time, Oh My Posh finally has a new CLI interface.
Starting out I had no experience in Go, nor any idea on how to create a proper CLI interface. Starting out I had no experience in Go, nor any idea on how to create a proper CLI interface.
Over the years the interface grew, but **_not in a very sustainable way_**, it was a chain of if statements Over the years the interface grew, but **_not in a very sustainable way_**, it was a chain of if statements
which was a bit of a pain to support. which was a bit of a pain to support.
You can now interact with Oh my Posh via an interface powered by [Cobra][cobra]. Not only does this You can now interact with Oh My Posh via an interface powered by [Cobra][cobra]. Not only does this
bring maintainability and extensibility, it at once introduces a few added features. bring maintainability and extensibility, it at once introduces a few added features.
#### Init #### Init

View file

@ -52,7 +52,7 @@ We already supported [fish shell][fish] for a while, but we stepped up the game.
as my primary shell, so obviously it couldn't stay behind. I suggest you also have as my primary shell, so obviously it couldn't stay behind. I suggest you also have
a go at it, it's a very enjoyable experience. a go at it, it's a very enjoyable experience.
But OK, what changed? We now support the following out of the box: But OK, what changed? We now support the following out-of-the-box:
- [right prompt][right] - [right prompt][right]
- [transient prompt][transient] - [transient prompt][transient]

View file

@ -12,7 +12,7 @@ hide_table_of_contents: false
--- ---
It finally happened, **I introduced a bug** that only appears in 1 use case and it cant be resolved as its the result of It finally happened, **I introduced a bug** that only appears in 1 use case and it cant be resolved as its the result of
using an old and new version of Oh My posh at the same time. Who does that you might ask? Well, it can be because youre using an old and new version of Oh My Posh at the same time. Who does that you might ask? Well, it can be because youre
using WSL on Windows, or VMs on any system while sharing the same configuration cross installation. using WSL on Windows, or VMs on any system while sharing the same configuration cross installation.
Not the main use-case, but also not exotic either. Not the main use-case, but also not exotic either.

View file

@ -8,7 +8,7 @@ import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem"; import TabItem from "@theme/TabItem";
:::info :::info
Due to limitations (or not having found a way just yet), this feature only works in `fish`, `zsh`, `powershell` and `cmd` (as of [clink][clink] version v1.2.46) for Due to limitations (or not having found a way just yet), this feature only works in `fish`, `zsh`, `powershell` and `cmd` (as of [Clink][clink] v1.2.46+) for
the time being. the time being.
::: :::

View file

@ -50,11 +50,11 @@ Once added, reload your profile for the changes to take effect.
</TabItem> </TabItem>
<TabItem value="cmd"> <TabItem value="cmd">
There's no out of the box support for Windows CMD when it comes to custom prompts. There's no out-of-the-box support for Windows CMD when it comes to custom prompts.
There is however a way to do it using [Clink][clink], which at the same time supercharges There is however a way to do it using [Clink][clink], which at the same time supercharges
your cmd experience. Follow the installation instructions and make sure you select autostart. your cmd experience. Follow the installation instructions and make sure you select autostart.
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 :::warning

View file

@ -34,7 +34,7 @@ Make sure to move these before running the command.
### Install oh-my-posh ### Install oh-my-posh
See your platform's installation guide. The preferred ways are **winget** and **homebrew**. See your platform's installation guide. The preferred ways are **winget** and **Homebrew**.
- [Windows][windows] - [Windows][windows]
- [macOS][macos] - [macOS][macos]
@ -64,7 +64,7 @@ oh-my-posh init pwsh --config ~/.custom.omp.json | Invoke-Expression
And replace `~/.custom.omp.json` with the location of your theme. And replace `~/.custom.omp.json` with the location of your theme.
#### I have an out of the box theme #### I have an out-of-the-box theme
```powershell ```powershell
oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" | Invoke-Expression
@ -73,8 +73,8 @@ oh-my-posh init pwsh --config "$env:POSH_THEMES_PATH\jandedobbeleer.omp.json" |
Replace `jandedobbeleer.omp.json` with the theme you use. Replace `jandedobbeleer.omp.json` with the theme you use.
:::caution :::caution
Only winget can add the `$env:POSH_THEMES_PATH` variable. For homebrew, use Only winget can add the environment variable `POSH_THEMES_PATH` automatically. For Homebrew, use
`$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json` `$(brew --prefix oh-my-posh)/themes/jandedobbeleer.omp.json`.
::: :::
[init]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/src/shell/scripts/omp.ps1 [init]: https://github.com/JanDeDobbeleer/oh-my-posh/blob/main/src/shell/scripts/omp.ps1