Tiny fzf integration for history substring search in PowerShell
Install fzf with your favorite method, I prefer winget in Windows
winget install --exact --id junegunn.fzf
Install-Module -Name PSFzfHistory
via Local modules
Exported functions
- Invoke-FzfHistory
- Set-FzfHistoryKeybind
In typical use, add these code in your $PROFILE(Profile.ps1)
# Make sure the winget tools in your PATH
# https://github.com/microsoft/winget-cli/issues/2498#issuecomment-1553863082
$env:Path = [System.Environment]::GetEnvironmentVariable("Path","Machine") + ";" + [System.Environment]::GetEnvironmentVariable("Path","User")
Set-FzfHistoryKeybind -Chord Ctrl+r
Multiline history may be unuseful behavior in fzf
I really want history substring search in all shells.
PSFzf is a helpful project, but the module loading speed is much slow for me.
I noticed I really want integrations only around history, unnecessary for file finders, and we may realize it with tiny PowerShell code.