Skip to content

Instantly share code, notes, and snippets.

@nightroman
Created May 19, 2017 14:59
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 nightroman/ea8e3e97315257b173ec62a02f29952c to your computer and use it in GitHub Desktop.
Save nightroman/ea8e3e97315257b173ec62a02f29952c to your computer and use it in GitHub Desktop.
My Microsoft.VSCode_profile.ps1
function prompt
{
#! now: last error for the color
$color = if ($?) { 10 } else { 12 }
# debug
if ($ExecutionContext.SessionState.PSVariable.GetValue('PSDebugContext')) {
return
}
# write prompt
Write-Host (Get-Location) -ForegroundColor Cyan
Write-Host "$NestedPromptLevel>" -NoNewLine -ForegroundColor $color
' '
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment