Created
April 27, 2013 00:16
-
-
Save justincjahn/5471316 to your computer and use it in GitHub Desktop.
Github for Windows PowerShell profile.
This file contains hidden or 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
| # 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