Skip to content

Instantly share code, notes, and snippets.

@ericchansen
Last active April 15, 2026 03:32
Show Gist options
  • Select an option

  • Save ericchansen/b8025735ab32d6948bc4de0dd883900d to your computer and use it in GitHub Desktop.

Select an option

Save ericchansen/b8025735ab32d6948bc4de0dd883900d to your computer and use it in GitHub Desktop.
PowerShell profile - Oh My Posh theme, Split-Copilot, PSCommandHelper
<#
.SYNOPSIS
PowerShell profile with Oh My Posh, posh-git, and Copilot CLI helpers.
.DESCRIPTION
Configures the interactive PowerShell experience:
- Oh My Posh prompt with a custom clean-detailed theme (hosted as a gist)
- osc99 enabled so split panes inherit the current working directory
- posh-git for Git branch/tag tab completion
- Split-Copilot function (alias: spc) to open Copilot CLI in a side pane
- PSCommandHelper module for learning PowerShell interactively
.NOTES
Copy this file to your $PROFILE path, or dot-source it from there.
#>
# Oh My Posh initialization with pwd: osc99 for split pane directory inheritance
# Theme includes osc99 setting - see https://github.com/shanselman/splitpanefix
oh-my-posh init pwsh --config "https://gist.githubusercontent.com/ericchansen/1efbd10b90802f5102ca23b5a72b04e3/raw/clean-detailed.omp.json" | Invoke-Expression
# Git branch/tag tab completion
Import-Module posh-git
# Split pane and launch GitHub Copilot CLI in current directory
function Split-Copilot {
wt -w 0 split-pane -d "$PWD" pwsh -NoLogo -NoExit -Command "copilot"
}
Set-Alias -Name spc -Value Split-Copilot
# PSCommandHelper - learn PowerShell by doing
Import-Module PSCommandHelper
Enable-PSCommandHelper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment