-
(Windows users only) Allow all powershell scripts to be run (Note: This will prevent Powershell from stopping you from running (potentially harmful) scripts) -
Set-ExecutionPolicy -Scope "CurrentUser" -ExecutionPolicy "Unrestricted"
-
Install
oh-my-posh
-Install-Module posh-git -Scope CurrentUser
andInstall-Module oh-my-posh -Scope CurrentUser
-
Open up the file
$profile
in your text editor of choice (VScode:code $profile
, Notepad:notepad $profile
) -
Add these lines:
Import-Module posh-git
Import-Module oh-my-posh
Set-PoshPrompt -Theme ~/pwsh10k.omp.json
-
Run
curl https://raw.githubusercontent.com/Kudostoy0u/pwsh10k/master/pwsh10k.omp.json --output pwsh10k.omp.json
(Windows users replacecurl
withcurl.exe
) -
Run
Copy-Item -Path pwsh10k.omp.json -Destination $HOME
-
Restart terminal and you should see a pretty prompt!
Edit pwsh10k.omp.json
(Notepad: notepad ~/pwsh10k.omp.json
, VScode: code ~/pwsh10k.omp.json
) and change as you see fit (how to configure a theme?)