junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
61.96k stars 2.34k forks source link

Reloading on windows seems broken #3828

Closed jelmansouri closed 1 month ago

jelmansouri commented 1 month ago

Checklist

Output of fzf --version

0.52.1 (6432f00)

OS

Shell

Problem / Steps to reproduce

When running the following command on a large codebase on windows:

fzf --ansi --disabled --bind="change:reload:rg --line-number --column --color=always {q} 2>&1"

Changes in input do not trigger a reload. For example entring main the search will stay stuck on m this only happens on windows though testing the same command on Linux yields the expected results.

I tried with setting $env:SHELL=powershell and forcing $env:SHELL=cmd and I still have the issue. Also tried using ctrl-r event rather than change and I have the same issue. I'm wondering if killing the process on windows is somehow broken or not fulling implemented (saw a FIXME in the code regarding process groups but seems to be related to previews)

Rg version: ripgrep 14.1.0 (rev e50df40a19)

Also tried with older versions of fzf going back to 0.41 without luck.

junegunn commented 1 month ago

e042143e3f983d7bd18a89bee1f9c19b7b6bd3b0 should fix the issue (it's on devel branch).

You can test it with this binary: fzf.exe.zip

jelmansouri commented 1 month ago

e042143 should fix the issue (it's on devel branch).

You can test it with this binary: fzf.exe.zip

Thank you sir! I had to build the branch myself since Windows Defender was acting up with the posted zip and gave it a test, the fix works and have the expected behavior!

(and thanks for this wondeful tool!)