Skip to content

Instantly share code, notes, and snippets.

@reschex
Last active November 21, 2023 13:48
Show Gist options
  • Save reschex/888f7c1a5803152100d9e1d3d6a5ee5e to your computer and use it in GitHub Desktop.
Save reschex/888f7c1a5803152100d9e1d3d6a5ee5e to your computer and use it in GitHub Desktop.
powershell prompt to include kubernetes context and git branch
function prompt {
$(if (Test-Path variable:/PSDebugContext) { '[DBG]: ' } else { '' }) +
$(Get-KubePS1) +
$(Get-GitPrompt) +
$(Split-Path -Path (Get-Location) -Leaf) +
$(if ($NestedPromptLevel -ge 1) { '>>' }) + '> '
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment