Created
February 10, 2026 16:32
-
-
Save s-h-a-d-o-w/6eaf6c156d7f6697b3dce01584ea7808 to your computer and use it in GitHub Desktop.
Powershell command history GUI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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