Working with the PowerShell in 2020 means fun, because of the new Windows Terminal (get it from Windows Store). It has more power as the old Powershell Console and it is visually adaptable to your personal taste, by installing the wonderful theming engine oh-my-posh from Jan De Dobbeleer.
To get Oh-My-Posh properly run, there are several steps to do I want to show here in a nutshell…
As the theming engine uses Powerline glyphs, you need to install a font which support them, for example the new Cascadia Code PL from Microsoft. Download, unzip and install the OTF and/or TTF font files via context menu in your Windows Explorer.
Open up you Terminal settings…
… and add following new line to the PowerShell section:
"fontFace": "Cascadia Code PL",
Following PowerShell command installs the theming engine itself:
Install-Module oh-my-posh -Scope CurrentUser
If you want to display Git status information also, run this command:
Install-Module posh-git -Scope CurrentUser
To let the command-line editing environment to be customized install PSReadline:
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
In order to load the theming engine in every new terminal window, edit your PowerShell profile by opening it up with the command …
and add following lines in the upcoming text file:
Paradox is one of 27 themes available. You will find all themes in your DOCUMENTS folder under
..\WindowsPowerShell\Modules\oh-my-posh\<version>\Themes and some visual representations at https://github.com/JanDeDobbeleer/oh-my-posh?#themes.
- Windows Store: Windows Terminal
- Microsoft: Cascadia Code PL
- GitHub: JanDeDobbeleer/oh-my-posh
- Microsoft Docs: Set up Powerline in Windows Terminal
- Scott Hanselman: How to make a pretty prompt in Windows Terminal with Powerline, Nerd Fonts, Cascadia Code, WSL, and oh-my-posh
- Scott Hanselman: Taking your PowerShell prompt to the next level with Windows Terminal and Oh my Posh 3