Avocado powered PowerShell setup. Inspired by Hanselmans Ultimate PowerShell prompt.
📂 Open explorer on ctrl + click on path
📜 Display git repo status, including changed and stashed files
💁♀️ Display latest git commit
🔋 Display battery if low
💽 Display RAM if high
👁️🗨️ Predictive autocomplete
To get started install the .NET Core powered PowerShell from the Microsoft Store.
When you have PowerShell installed, get Oh My Posh. This can be done easily by following their guide at Oh My Posh Installation. Use it to:
- Install Oh My Posh
- Install NerdFont (Includes icons needed)
- Configure your terminal to use font
To use the setup in this repo, add theme.omp.json to the location pointed to by the environment variable POSH_THEMES_PATH (default path is C:\Users\[user]\AppData\Local\Programs\oh-my-posh\themes). Add the following line to your PowerShell profile (open with VS Code: code $PROFILE
).
oh-my-posh --init --shell pwsh --config "$env:POSH_THEMES_PATH\theme.omp.json" | Invoke-Expression
To edit the theme in VS Code, run the following line in your terminal.
code "$env:POSH_THEMES_PATH\theme.omp.json"
Update theme colors in your terminal to make it look sexy.
To install autocomplete, run the following commands in PowerShell
Install-Module PSReadLine -AllowPrerelease -Force
Install-Module PowerType -AllowPrerelease
Then add the following lines to your PowerShell profile
Import-Module PSReadLine
Enable-PowerType
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView
Set-PSReadLineOption -EditMode Windows
View Profile.ps1 for full profile