Created
April 15, 2024 19:35
-
-
Save mikedhanson/d36d06e394a6eba8156dab15f142374f to your computer and use it in GitHub Desktop.
Windows powershell profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# PSREADLINE #> | |
if (Get-Module -Name PSReadLine) { | |
Import-Module PSReadLine | |
#Set-PSReadLineOption -EditMode Windows | |
Set-PSReadLineOption -PredictionSource History | |
Set-PSReadLineOption -PredictionViewStyle ListView | |
if ($host.Version.Major -eq 7) { | |
#only PS 7 supports HistoryAndPlugin | |
Set-PSReadLineOption -PredictionSource HistoryAndPlugin | |
} | |
else { | |
#use history as the prediction source on 5.1 | |
} | |
} | |
else { | |
write-Error "Psreadline module doesnt exist." | |
} | |
Import-Module "C:\ProgramData\UniversalAutomation\Repository\Modules\SDTools\1.0.0\SDTools.psm1" | |
#Set-Location -Path 'C:\' | |
$ThemesPath = 'C:\Users\<profile>\AppData\Local\Programs\oh-my-posh\themes' | |
oh-my-posh prompt init pwsh --config $ThemesPath\clean-detailed.omp.json | Invoke-Expression |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment