@@ -16,6 +16,33 @@ While Oh my Posh works on the standard terminal, we advise using the [Windows Te
1616
1717### Installation
1818
19+ <Tabs
20+ defaultValue = " winget"
21+ groupId = " install"
22+ values = { [
23+ { label: ' winget' , value: ' winget' , },
24+ { label: ' scoop' , value: ' scoop' , },
25+ ]
26+ } >
27+ <TabItem value = " winget" >
28+
29+ ``` powershell
30+ winget install JanDeDobbeleer.OhMyPosh
31+ ```
32+
33+ This installs a couple of things:
34+
35+ - ` oh-my-posh.exe ` - Windows executable, added to your ` $PATH `
36+ - ` oh-my-posh-wsl ` - Linux executable, added to your ` $PATH ` for use in the WSL
37+ - ` themes ` - The latest Oh my Posh themes
38+
39+ If you want to use a standard theme, you can find them in ` ~\AppData\Local\Programs\oh-my-posh\themes\ ` ,
40+ referencing them as such
41+ will always keep them compatible with the binary when updating Oh my Posh.
42+
43+ </TabItem >
44+ <TabItem value = " scoop" >
45+
1946``` powershell
2047scoop install https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/oh-my-posh.json
2148```
@@ -30,12 +57,27 @@ If you want to use a standard theme, you can find them in `~\scoop\apps\oh-my-po
3057referencing them as such
3158will always keep them compatible with the binary when updating Oh my Posh.
3259
60+ </TabItem >
61+ </Tabs >
62+
63+ For the ` $PATH ` to reload, a reboot is advised.
64+
3365### Usage
3466
3567#### Preview the themes
3668
69+ <Tabs
70+ defaultValue = " winget"
71+ groupId = " install"
72+ values = { [
73+ { label: ' winget' , value: ' winget' , },
74+ { label: ' scoop' , value: ' scoop' , },
75+ ]
76+ } >
77+ <TabItem value = " winget" >
78+
3779``` powershell
38- Get-ChildItem -Path "$(scoop prefix oh-my-posh)/ themes/ *" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {
80+ Get-ChildItem -Path "~\AppData\Local\Programs\ oh-my-posh\ themes\ *" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {
3981 $esc = [char]27
4082 Write-Host ""
4183 Write-Host "$esc[1m$($_.BaseName)$esc[0m"
@@ -45,18 +87,75 @@ Get-ChildItem -Path "$(scoop prefix oh-my-posh)/themes/*" -Include '*.omp.json'
4587}
4688```
4789
90+ </TabItem >
91+ <TabItem value = " scoop" >
92+
93+ ``` powershell
94+ Get-ChildItem -Path "$(scoop prefix oh-my-posh)\themes\*" -Include '*.omp.json' | Sort-Object Name | ForEach-Object -Process {
95+ $esc = [char]27
96+ Write-Host ""
97+ Write-Host "$esc[1m$($_.BaseName)$esc[0m"
98+ Write-Host ""
99+ oh-my-posh --config $($_.FullName) --pwd $PWD
100+ Write-Host ""
101+ }
102+ ```
103+
104+ </TabItem >
105+ </Tabs >
106+
48107#### Update
49108
109+ <Tabs
110+ defaultValue = " winget"
111+ groupId = " install"
112+ values = { [
113+ { label: ' winget' , value: ' winget' , },
114+ { label: ' scoop' , value: ' scoop' , },
115+ ]
116+ } >
117+ <TabItem value = " winget" >
118+
119+ ``` powershell
120+ winget upgrade JanDeDobbeleer.OhMyPosh
121+ ```
122+
123+ </TabItem >
124+ <TabItem value = " scoop" >
125+
50126``` powershell
51127scoop update oh-my-posh
52128```
53129
130+ </TabItem >
131+ </Tabs >
132+
54133### Replace your existing prompt
55134
56- You can find the themes scoop installs inside the ` "$(scoop prefix oh-my-posh)/themes/" ` folder.
57- To use ` jandedobbeleer.omp.json ` for example, you can refer to it using ` "$(scoop prefix oh-my-posh)/themes/jandedobbeleer.omp.json" `
135+ <Tabs
136+ defaultValue = " winget"
137+ groupId = " install"
138+ values = { [
139+ { label: ' winget' , value: ' winget' , },
140+ { label: ' scoop' , value: ' scoop' , },
141+ ]
142+ } >
143+ <TabItem value = " winget" >
144+
145+ You can find the themes scoop installs inside the ` ~\AppData\Local\Programs\oh-my-posh\themes\ ` folder.
146+ To use ` jandedobbeleer.omp.json ` for example, you can refer to it using ` ~\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json" `
58147when setting the prompt using the ` --config ` flag.
59148
149+ </TabItem >
150+ <TabItem value = " scoop" >
151+
152+ You can find the themes scoop installs inside the ` "$(scoop prefix oh-my-posh)\themes\" ` folder.
153+ To use ` jandedobbeleer.omp.json ` for example, you can refer to it using ` "$(scoop prefix oh-my-posh)\themes\jandedobbeleer.omp.json" `
154+ when setting the prompt using the ` --config ` flag.
155+
156+ </TabItem >
157+ </Tabs >
158+
60159The guides below use an imaginary theme called ` mytheme.omp.json ` , so make sure to replace that with your own, or one of the
61160included themes.
62161
0 commit comments