mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2024-12-25 19:14:50 -08:00
docs(installation): add chocolatey
This commit is contained in:
parent
86b3e1cc62
commit
2dfa6a5a98
|
@ -22,6 +22,7 @@ While Oh My Posh works on the standard terminal, we advise using the [Windows Te
|
|||
values={[
|
||||
{ label: 'winget', value: 'winget', },
|
||||
{ label: 'scoop', value: 'scoop', },
|
||||
{ label: 'chocolatey', value: 'chocolatey'},
|
||||
]
|
||||
}>
|
||||
<TabItem value="winget">
|
||||
|
@ -57,6 +58,27 @@ If you want to use a standard theme, you can find them in `~\scoop\apps\oh-my-po
|
|||
referencing them as such
|
||||
will always keep them compatible with the binary when updating Oh My Posh.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="chocolatey">
|
||||
|
||||
:::info
|
||||
The chocolatey package is managed by [Curtis Carter][cc]. In case of problems, please create an issue [here][cc-choco].
|
||||
:::
|
||||
|
||||
```powershell
|
||||
choco install oh-my-posh
|
||||
```
|
||||
|
||||
This installs a couple of things:
|
||||
|
||||
- `oh-my-posh.exe` - Windows executable, added to your `$PATH`
|
||||
- `oh-my-posh-wsl` - Linux executable, added to your `$PATH` for use in the WSL
|
||||
- `themes` - The latest Oh My Posh themes
|
||||
|
||||
If you want to use a standard theme, you can find them in `~\AppData\Local\Programs\oh-my-posh\themes\`,
|
||||
referencing them as such
|
||||
will always keep them compatible with the binary when updating Oh My Posh.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -72,6 +94,7 @@ For the `$PATH` to reload, a reboot is advised.
|
|||
values={[
|
||||
{ label: 'winget', value: 'winget', },
|
||||
{ label: 'scoop', value: 'scoop', },
|
||||
{ label: 'chocolatey', value: 'chocolatey'},
|
||||
]
|
||||
}>
|
||||
<TabItem value="winget">
|
||||
|
@ -101,6 +124,20 @@ Get-ChildItem -Path "$(scoop prefix oh-my-posh)\themes\*" -Include '*.omp.json'
|
|||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="chocolatey">
|
||||
|
||||
```powershell
|
||||
Get-ChildItem -Path "~\AppData\Local\Programs\oh-my-posh\themes\*" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {
|
||||
$esc = [char]27
|
||||
Write-Host ""
|
||||
Write-Host "$esc[1m$($_.BaseName)$esc[0m"
|
||||
Write-Host ""
|
||||
oh-my-posh --config $($_.FullName) --pwd $PWD
|
||||
Write-Host ""
|
||||
}
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -112,6 +149,7 @@ Get-ChildItem -Path "$(scoop prefix oh-my-posh)\themes\*" -Include '*.omp.json'
|
|||
values={[
|
||||
{ label: 'winget', value: 'winget', },
|
||||
{ label: 'scoop', value: 'scoop', },
|
||||
{ label: 'chocolatey', value: 'chocolatey'},
|
||||
]
|
||||
}>
|
||||
<TabItem value="winget">
|
||||
|
@ -127,6 +165,13 @@ winget upgrade JanDeDobbeleer.OhMyPosh
|
|||
scoop update oh-my-posh
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="chocolatey">
|
||||
|
||||
```powershell
|
||||
choco upgrade oh-my-posh
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -138,6 +183,7 @@ scoop update oh-my-posh
|
|||
values={[
|
||||
{ label: 'winget', value: 'winget', },
|
||||
{ label: 'scoop', value: 'scoop', },
|
||||
{ label: 'chocolatey', value: 'chocolatey'},
|
||||
]
|
||||
}>
|
||||
<TabItem value="winget">
|
||||
|
@ -153,6 +199,13 @@ You can find the themes scoop installs inside the `"$(scoop prefix oh-my-posh)\t
|
|||
To use `jandedobbeleer.omp.json` for example, you can refer to it using `"$(scoop prefix oh-my-posh)\themes\jandedobbeleer.omp.json"`
|
||||
when setting the prompt using the `--config` flag.
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="chocolatey">
|
||||
|
||||
You can find the themes winget installs inside the `~\AppData\Local\Programs\oh-my-posh\themes\` folder.
|
||||
To use `jandedobbeleer.omp.json` for example, you can refer to it using `~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json`
|
||||
when setting the prompt using the `--config` flag.
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -165,6 +218,7 @@ Based on the installation method used, you can find this theme at the following
|
|||
values={[
|
||||
{ label: 'winget', value: 'winget', },
|
||||
{ label: 'scoop', value: 'scoop', },
|
||||
{ label: 'chocolatey', value: 'chocolatey'},
|
||||
]
|
||||
}>
|
||||
<TabItem value="winget">
|
||||
|
@ -176,6 +230,11 @@ Based on the installation method used, you can find this theme at the following
|
|||
|
||||
`"$(scoop prefix oh-my-posh)\themes\jandedobbeleer.omp.json"`
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="chocolatey">
|
||||
|
||||
`~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json`
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
|
@ -203,3 +262,5 @@ Inside the WSL, replace `~` with the following path: `/mnt/c/Users/<WINDOWSUSERN
|
|||
[scoop]: https://scoop.sh/
|
||||
[wt]: https://github.com/microsoft/terminal
|
||||
[powershell]: https://www.powershellgallery.com/packages/oh-my-posh
|
||||
[cc]: https://github.com/digitalcoyote
|
||||
[cc-choco]: https://github.com/digitalcoyote/chocolatey-packages/tree/master/oh-my-posh
|
||||
|
|
Loading…
Reference in a new issue