Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Tab Expansion #200

Open
jeeeem opened this issue Nov 18, 2022 · 5 comments
Open

Continuous Tab Expansion #200

jeeeem opened this issue Nov 18, 2022 · 5 comments

Comments

@jeeeem
Copy link

jeeeem commented Nov 18, 2022

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
Copy link
Contributor

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.

@SpBills
Copy link

SpBills commented Oct 29, 2024

Hmm. I believe the question might have been this:

cd abc + enter should automatically be cd abc\ so that you can just press tab again without typing \ yourself.

@mattcargile
Copy link
Contributor

Ah yeah I see. Maybe the below could be helpful too

[System.Management.Automation.CompletionCompleters]::CompleteFilename( 'abc' )

I assume the below code space needs to be edited to add the ending \. It appears the PowerShell engine as of 7.4.6 has to do the same thing.

function script:Invoke-FzfTabCompletionInner() {

@SpBills
Copy link

SpBills commented Nov 7, 2024

I can do a quick PR for that if you are accepting help @mattcargile .

@mattcargile
Copy link
Contributor

I think it would be a welcome inclusion, @SpBills . I would wait for @kelleyma49 's take on it as he is one performing the merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants