Skip to content

Instantly share code, notes, and snippets.

@ctolkien
Created December 5, 2012 01:25
Show Gist options
  • Save ctolkien/4211120 to your computer and use it in GitHub Desktop.
Save ctolkien/4211120 to your computer and use it in GitHub Desktop.
Profile
Push-Location (Split-Path -Path $MyInvocation.MyCommand.Definition -Parent)
Import-Model posh-sprintly
Set-SprintlyCredentials "asd@asd" "sdsdsdsdsd" -silent
# If module is installed in a default location ($env:PSModulePath),
# use this instead (see about_Modules for more information):
Import-Module posh-git
Import-Module posh-hg
# 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) -nonewline
Write-VcsStatus
if ($global:SprintlyCurrentProject) {
Write-SprintlyPrompt
}
$global:LASTEXITCODE = $realLASTEXITCODE
return "> "
}
Enable-GitColors
Pop-Location
Start-SshAgent -Quiet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment