Skip to content

Instantly share code, notes, and snippets.

@justincjahn
Created April 27, 2013 00:16
Show Gist options
  • Select an option

  • Save justincjahn/5471316 to your computer and use it in GitHub Desktop.

Select an option

Save justincjahn/5471316 to your computer and use it in GitHub Desktop.
Github for Windows PowerShell profile.
# Dot source the GitHub for Windows shell variables
. (Join-Path $env:USERPROFILE "AppData\Local\GitHub\shell.ps1")
# Load posh-git module from current directory
Import-Module (Join-Path $env:github_posh_git "posh-git.psm1")
# Set up a simple prompt, adding the git prompt parts inside git repos
function prompt {
$realLASTEXITCODE = $LASTEXITCODE
# Reset color, which can be messed up by Enable-GitColors
$Host.UI.RawUI.ForegroundColor = $GitPromptSettings.DefaultForegroundColor
Write-Host($pwd.ProviderPath) -nonewline
Write-VcsStatus
$global:LASTEXITCODE = $realLASTEXITCODE
return "> "
}
Enable-GitColors
Start-SshAgent -Quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment