Skip to content

Instantly share code, notes, and snippets.

View HeyItsGilbert's full-sized avatar

Gilbert Sanchez HeyItsGilbert

View GitHub Profile
@HeyItsGilbert
HeyItsGilbert / ShellIntegration.ps1
Created July 17, 2023 23:12 — forked from mdgrs-mei/ShellIntegration.ps1
Adds escape codes to the prompt for the shell integration
# Reference:
# https://devblogs.microsoft.com/commandline/shell-integration-in-the-windows-terminal/
param
(
[ValidateSet('WindowsTerminal', 'ITerm2')]
[String]$TerminalProgram = 'WindowsTerminal'
)
# Restore hooked functions in case this script is executed accidentally twice