Interactive full-screen search through PowerShell command history.
demo.mp4
- Real-time search with regex support across your entire PSReadLine history
- Full-screen display using alternate screen buffer (like
vim,less,htop) - Smooth keyboard navigation with arrows, PageUp/PageDown, Home/End
- Direct injection onto the prompt via
Ctrl+H— no copy-paste needed - Clean restore: your previous screen is restored exactly as it was after searching
- Most recent first: results are sorted with newest commands at the top
git clone https://github.com/<your-user>/Powershell-find-history.git
cd Powershell-find-history
.\Install.ps1The install script will:
- Copy
PowerShell-Advanced-History.ps1to~/Documents/PowerShell/Scripts/ - Add auto-loading to your PowerShell profile
- Available in every new session
Add this line to your PowerShell profile ($PROFILE):
. "path\to\PowerShell-Advanced-History.ps1"| Shortcut | Action |
|---|---|
Ctrl+H |
Search and inject the command directly onto the prompt |
pah |
Search and copy to clipboard (Ctrl+V to paste) |
| Key | Action |
|---|---|
| Up / Down | Navigate through results |
| PageUp / PageDown | Jump by page |
| Home / End | Go to first / last result |
| Enter | Select the command |
| Escape | Quit without selecting |
| Delete | Clear the search |
| Backspace | Remove last character |
Type directly to filter — the filter supports regular expressions.
Ctrl+H runs inside the PSReadLine context, which allows injecting the command directly onto the prompt line. Just press Enter to execute it.
pah is a regular command — once it finishes, PowerShell displays a fresh prompt. There is no way to write to that new prompt from the previous command, hence the clipboard fallback.
- PowerShell 5.1 (Windows PowerShell) and PowerShell 7+
- Windows Terminal recommended for best rendering
- Requires the PSReadLine module (included by default)
