Skip to content

Commit d62c3d6

Browse files
chore: add powershell theme information
1 parent e60daec commit d62c3d6

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

docs/docs/package-powershell.mdx

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,29 @@ Get-PoshThemes
3434
Autocompletion is available so it will loop through all available themes.
3535

3636
```powershell
37-
Set-PoshPrompt -Theme ~/downloadedtheme.json
37+
Set-PoshPrompt -Theme jandedobbeleer
3838
```
3939

40-
### Print the theme
40+
### Create your own theme
4141

42-
Useful when you find a theme you like, but you want to tweak the settings a bit. The output is a formatted `json` string.
42+
You can output the current theme to its `JSON` representation which can be used to tweak and store as your custom theme.
4343

4444
```powershell
4545
Write-PoshTheme
4646
```
4747

48+
Due to a bug in PowerShell, if you want to use `Out-File` directly to write the current theme to a new file, use the `oem`
49+
encoding to ensure the symbols are outputted correctly.
50+
51+
```powershell
52+
Write-PoshTheme | Out-File -FilePath ~/.mytheme.omp.json -Encoding oem
53+
```
54+
55+
Once you're done editing, adjust your `$PROFILE` to use your newly created theme.
56+
57+
```powershell
58+
Set-PoshPrompt -Theme ~/.mytheme.omp.json
59+
```
60+
4861
[nerdfonts]: https://www.nerdfonts.com/
4962
[nf-cheat]: https://www.nerdfonts.com/cheat-sheet

0 commit comments

Comments
 (0)