So I tried installing oh-my-posh for windows with
Install-Module oh-my-posh -Scope CurrentUser
and typed
Get-PoshThemes
to see the available themes which I downloaded. But I got this message
Get-PoshThemes : The term 'Get-PoshThemes' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:1 char:1
+ Get-PoshThemes
+ ~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Get-PoshThemes:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Can anyone help me?
Solution
(Note: I'm running PowerShell 7.1 LTS)
First, install a Nerd Font:
[skip if you've already done so]
Instructions for installing a Nerd Font:
Then, install
oh-my-posh:1. Install:
posh-gitoh-my-posh:2. ...follow the rest of the instructions here:
3. ...finally, try the command again:
Optional
To avoid manually entering
Set-PoshPrompt, include the command in your PowerShell$PROFILE:...you should see your PowerShell prompt change when you open a start shell instance (i.e. new PowerShell tab or window).
Closing thoughts (side-note)
Before I got it to work, I originally followed the instructions here:
...no mention of the
posh-gitmodule or theSet-PoshPromptcommand (as of 12/30/2021).