kelleyma49 / PSFzf

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

Invoke-PsFzfRipgrep hungs when opening file with Neovim. #230

Open AlexandrosAlexiou opened 10 months ago

AlexandrosAlexiou commented 10 months ago

Observed: It hungs with the following output: Executing 'nvim "D:\test\Tests\Public\remote.Tests.ps1" +5'... Checked the code and it seems that it hungs here. Any insights?

How to reproduce:

  1. Create config
$env:EDITOR = "nvim"
# Set the key handler to Invoke-PsFzfRipgrep with Ctrl+g
Set-PSReadlineKeyHandler -Chord 'Ctrl+g' -ScriptBlock {
    Invoke-PsFzfRipgrep -searchstring "" 
}
  1. Hit "ctrl + g" and select a file to open

Note: Seems to be working if I set the editor to "code"

mattcargile commented 8 months ago

Are you intending to call with an empty string? That would seem to take quite some time to handle.

AlexandrosAlexiou commented 8 months ago

Are you intending to call with an empty string? That would seem to take quite some time to handle.

I start with empty string to immediately invoke PsFzfRipgrep without providing a search string first

If I do not provide an empty string Invoke-PsFzfRipgrep expects a search sting to be provided first before initiating the search.

cmdlet Invoke-PsFzfRipgrep at command pipeline position 1
Supply values for the following parameters:
SearchString: