Created
February 14, 2019 15:53
-
-
Save bradphelan/f3141cd1b2605ddb29ca50c61bd7e722 to your computer and use it in GitHub Desktop.
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
# Trigger fuzzy search | |
Set-PSReadlineKeyHandler ` | |
-Chord 'Ctrl+s' ` | |
-BriefDescription "InsertHeatseekerPathInCommandLine" ` | |
-LongDescription "Run Heatseeker in the PWD, appending any selected paths to the current command" ` | |
-ScriptBlock { | |
$choices = [IO.File]::ReadAllText($(Resolve-Path .hscache)) | hs | |
$ps::Insert($choices -join " ") | |
} | |
# Rebuild cache | |
Set-PSReadlineKeyHandler ` | |
-Chord 'Ctrl+Alt+s' ` | |
-BriefDescription "RebuildHeatseekerPathInCommandLineCache" ` | |
-LongDescription "Rebuilds the heatseaker cache" ` | |
-ScriptBlock { | |
Get-ChildItem -Name -Attributes !D -Recurse > .hscache | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment