Skip to content

Instantly share code, notes, and snippets.

@easel
Last active April 1, 2019 14:55
Show Gist options
  • Save easel/fa2038a3978783e2b49f0ce5b72b65b5 to your computer and use it in GitHub Desktop.
Save easel/fa2038a3978783e2b49f0ce5b72b65b5 to your computer and use it in GitHub Desktop.
PowerShell Core!
// Install powershell core 6
// https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6
// Install posh-git by running this command from an Admin powershell 6 prompt
// PowerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
// Or via chocalatey
// choco install poshgit
// paste this stuff into your user profile
// notepad $profile.CurrentUserAllHosts
Import-Module posh-git
Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete
function code{Invoke-Expression("$HOME\AppData\Local\Code\bin\code.cmd $args")}
pushd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\Tools"
cmd /c "VsDevCmd.bat&set" |
foreach {
if ($_ -match "=") {
$v = $_.split("="); set-item -force -path "ENV:\$($v[0])" -value "$($v[1])"
}
}
popd
Write-Host "`nVisual Studio 2017 Command Prompt variables set." -ForegroundColor Yellow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment