Skip to content

Instantly share code, notes, and snippets.

@s-h-a-d-o-w
Created February 10, 2026 16:32
Show Gist options
  • Select an option

  • Save s-h-a-d-o-w/6eaf6c156d7f6697b3dce01584ea7808 to your computer and use it in GitHub Desktop.

Select an option

Save s-h-a-d-o-w/6eaf6c156d7f6697b3dce01584ea7808 to your computer and use it in GitHub Desktop.
Powershell command history GUI
# Put into $PROFILE, trigger with Ctrl+h
Set-PSReadLineKeyHandler -Chord Ctrl+h -ScriptBlock {
$history = Get-Content (Get-PSReadLineOption).HistorySavePath
[array]::Reverse($history)
$selected = $history | Out-GridView -PassThru
if ($selected) {
[Microsoft.PowerShell.PSConsoleReadLine]::Insert($selected)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment