Last active
June 3, 2020 18:15
-
-
Save hugsy/dfb5e88eb0492ae193570a4daae80f9f to your computer and use it in GitHub Desktop.
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
Import-Module posh-git | |
Import-Module oh-my-posh | |
Set-Theme Paradox | |
Set-PSReadlineOption -EditMode Emacs | |
Set-PSReadLineKeyHandler -Chord Ctrl+LeftArrow -Function BackwardWord | |
Set-PSReadLineKeyHandler -Chord Ctrl+RightArrow -Function NextWord | |
Function Invoke-CmdScript { | |
param( | |
[String] $scriptName | |
) | |
$cmdLine = """$scriptName"" $args & set" | |
& $env:SystemRoot\system32\cmd.exe /c $cmdLine | | |
Select-String '^([^=]*)=(.*)$' | ForEach-Object { | |
$varName = $_.Matches[0].Groups[1].Value | |
$varValue = $_.Matches[0].Groups[2].Value | |
Set-Item Env:$varName $varValue | |
} | |
} | |
Function Invoke-VisualStudio2019x64 | |
{ | |
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat" | |
} | |
Function Invoke-VisualStudio2019x86 | |
{ | |
Invoke-CmdScript "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars32.bat" | |
} | |
Remove-Item alias:curl | |
Remove-Item alias:wget | |
New-Alias grep findstr |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment