Oh My Posh¶
Oh My Posh is a tool designed to enhance the user experience and productivity of individuals working with command-line interfaces by allowing them to customize their shell prompts.
Info
Written for Windows 11
Setup Windows Terminal¶
https://github.com/microsoft/terminal
Install Oh My Posh¶
Update Oh My Posh¶
Set-ExecutionPolicy Bypass -Scope Process -Force; Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://ohmyposh.dev/install.ps1'))
Install a font¶
Choose your font, I like Meslo.
Once install configure Terminal to use it by editing the settings.json
file. An easy way to open this file is to hit ctrl - shft - ,
when Terminal is in focus.
Under the defaults
block set the font.
Configure Powershell to use Oh My Posh¶
Open the Powershell profile text file.
Add the following line
Reload your Powershell session to trigger the change
Install Themes¶
To install the current themes
Themes location: C:\Users\userName\AppData\Local\Programs\oh-my-posh\themes
To change your theme, adjust the init script in C:\Users\neilg_fe5udmm\OneDrive\Documents\PowerShell\Microsoft.PowerShell_profile.ps1.
Example
```powershell
oh-my-posh init pwsh --config 'C:\Users\userName\AppData\Local\Programs\oh-my-posh\themes\jandedobbeleer.omp.json' | Invoke-Expression
```
Predictive Intellisense¶
Install the library.
Add this to $PROFILE
# Add auto complete (requires PSReadline 2.2.0-beta1+ prerelease)
Set-PSReadLineOption -PredictionSource History
Set-PSReadLineOption -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
Additional icons¶
Install the library.
Add this to $PROFILE