Closed ntpeters closed 2 years ago
I think I found the issue. This line appears to be the problem: https://github.com/kelleyma49/PSFzf/blob/b97263a30addd9a2c84a8603382c92e4e6de0eeb/PSFzf.Base.ps1#L49
This should be invoking the command directly, rather than through cmd
. If I make that change locally it seems to work fine. Looks like this should also be using the quoted directory path here too.
Beyond this fix, it'd be nice to have additional options (viaSet-PSFzfOption
) to explicitly specify a format string for this command along with options to provide args for searching by directory only and colorization. It may not always be desirable to use $FZF_DEFAULT_COMMAND
, so providing options to override that would be great.
The intended behavior is to pass the command to the native shell.
I believe the actual problem you are seeing is related to a regression I introduced into fzf
itself a couple of months back. I have fixed the regression (https://github.com/junegunn/fzf/pull/2580), but fzf
hasn't had an update in a couple of months. If you're setup to build go binaries, you can check out fzf
's head to test the fix.
fzf versions great than 0.27.3 should resolve this problem, so I'm closing this for now. Let me know if you see it again.
Repro Steps:
Expected Behavior
Search is refined by the entered text, and am able to select a result with the arrow keys.
Actual Behavior
Search stops after the first character is entered, and fzf seems to freeze as it's no longer responsive to arrow keys or the escape key. It's possible to only backspace up to the first character entered, but it doesn't allow deleting that first character. Pressing enter selects the first entry, otherwise the only way to exit is Ctrl+C as it's not responsive to escape.
Screenshots
After entering a search term:
After attempting to delete the entire search term:
Versions
PowerShell Profile
Relevant lines in my profile:
Environment
FZF_DEFAULT_COMMAND = 'fd --type file'