I always used Powerline in Linux but I didn't know it had an option for Windows, very nice :-)
Powerline provides a customized command prompt experience providing Git status color-coding and prompts.
Set execution policy
Get-ExecutionPolicy -List
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope Process
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope LocalMachine
Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Install Git on Windows
choco install git wget unzip code
Install Powerline in PowerShell
Using PowerShell, install Posh-Git and Oh-My-Posh:
Install-Module posh-git -Scope CurrentUser
Install-Module oh-my-posh -Scope CurrentUser
If you are using PowerShell Core, install PSReadline:
Install-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck
In your PowerShell profile, add the following to the end of the file and Customize your PowerShell prompt:
echo 'Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme paradox' > $PROFILE
List of themes: https://ohmyposh.dev/docs/themes/
Powerline fonts: https://github.com/powerline/fonts
cd ${HOME}\Downloads\
wget -c https://github.com/powerline/fonts/archive/refs/heads/master.zip
unzip .\master.zip
Set-ExecutionPolicy Bypass -Scope Process -Force; powershell ${HOME}\Downloads\fonts-master\install.ps1
Set Ubuntu Mono derivative Powerline as your font:
{
"colorScheme": "Solarized Dark",
"commandline": "powershell.exe",
"fontFace": "Ubuntu Mono derivative Powerline",
"guid": "{61c54bbd-c2c6-5271-96e7-009a87ff44bf}",
"hidden": false,
"name": "Windows PowerShell"
},
Source:
https://github.com/powerline/powerline
https://docs.microsoft.com/en-us/windows/terminal/tutorials/powerline-setup
Top comments (1)
👏👏👏👏👏