Skip to content

Instantly share code, notes, and snippets.

@sqeezy
Last active December 4, 2017 12:35
Show Gist options
  • Save sqeezy/5d1647ce387d04fd814d4d1802990b26 to your computer and use it in GitHub Desktop.
Save sqeezy/5d1647ce387d04fd814d4d1802990b26 to your computer and use it in GitHub Desktop.
function Set-PowershellPrompt{
if (!(Test-Path -Path $PROFILE)){ New-Item -Path $PROFILE -ItemType File } ; ise $PROFILE
}
function prompt {
$origLastExitCode = $LASTEXITCODE
Write-VcsStatus
Write-Host $ExecutionContext.SessionState.Path.CurrentLocation -ForegroundColor Green
$LASTEXITCODE = $origLastExitCode
"$('>' * ($nestedPromptLevel + 1)) "
}
Get-ChildItem -Filter "*.ps*1" -File "~\Github\PsDevScripts" | ForEach-Object {Import-Module $_.FullName}
Import-Module posh-git
$global:GitPromptSettings.BeforeText = '['
$global:GitPromptSettings.AfterText = '] '
$GitPromptSettings.DefaultPromptAbbreviateHomeDirectory = $true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment