Skip to content

Instantly share code, notes, and snippets.

@crossan007
Created November 7, 2017 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save crossan007/9f1c420a3efdcfa9298f54103291e9ee to your computer and use it in GitHub Desktop.
Save crossan007/9f1c420a3efdcfa9298f54103291e9ee to your computer and use it in GitHub Desktop.
function prompt {
$origLastExitCode = $LASTEXITCODE
$Leaf = $(Split-Path -Path $($ExecutionContext.SessionState.Path.CurrentLocation) -Leaf)
$ParentLeaf = Split-Path -Path $($(Split-Path -Path $($ExecutionContext.SessionState.Path.CurrentLocation) -Parent)) -Leaf
Write-Host "$ParentLeaf\$Leaf" -NoNewline
Write-VcsStatus
$LASTEXITCODE = $origLastExitCode
"$('>' * ($nestedPromptLevel + 1)) "
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment