kelleyma49 / PSFzf

A PowerShell wrapper around the fuzzy finder fzf
MIT License
752 stars 35 forks source link

Continuous Tab Expansion #200

Open jeeeem opened 1 year ago

jeeeem commented 1 year ago

Is it possible to have an option to have a continuous tab expansion without typing the directory separator like I only need to press tab twice for the fzf to show?

mattcargile commented 1 year ago

You could do the below for tab completion. PSReadline supports <TAB> + <TAB> though this will break normal single <TAB> usage.

$PsFzfDesc = 'Uses PSReadline''s Completion results at any given cursor position and context ' +
    'as the source for PsFzf''s module wrapper for fzf.exe'
$PsFzfParam = @{
    Chord = 'Tab,Tab'
    BriefDescription = 'Fzf Tab Completion' 
    Description = $PsFzfDesc
    ScriptBlock = { Invoke-FzfTabCompletion }
}
Set-PSReadLineKeyHandler @PsFzfParam

This section in the docs might help too.