Skip to content

Instantly share code, notes, and snippets.

@hyrmn
Created February 2, 2014 00:17
Show Gist options
  • Save hyrmn/8761179 to your computer and use it in GitHub Desktop.
Save hyrmn/8761179 to your computer and use it in GitHub Desktop.
function prompt
{
$(get-location) + "> "
}
function Get-Batchfile ($file) {
$cmd = "`"$file`" & set"
cmd /c $cmd | Foreach-Object {
$p, $v = $_.split('=')
Set-Item -path env:$p -value $v
}
}
function Load-Vs2012Tools()
{
$batchFile = [System.IO.Path]::Combine($env:VS110COMNTOOLS, "VsDevCmd.bat")
Get-Batchfile -file $batchFile
Write-Host -ForegroundColor 'Yellow' "VsVars has been loaded from: $batchFile"
}
$env:path += ";" + (Get-Item "Env:ProgramFiles(x86)").Value + "\Git\bin"
# Load posh-git profile
. 'C:\Users\Ben\Documents\WindowsPowerShell\Modules\posh-git\profile.ps1'
# Load up crumb
. 'C:\Users\Ben\Documents\WindowsPowerShell\crumbs.ps1'
Load-Vs2012Tools
set-location d:\code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment