Skip to content

FZF appears to swallow key presses when used with less on Git Bash with ZSH on Windows #4260

Open
@marovira

Description

@marovira

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.60.0 (3347d61)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Steps

  1. Open a terminal using either Git Bash or ZSH within Git Bash.
  2. Enter echo "<file>" | fzf --bind="enter:execute(less {})" where <file> is any regular file.
  3. The fzf prompt appears with the given file. Press enter to select it.

Image

  1. The less prompt opens. Now try to press any key (j, k, etc) and see that nothing happens. Pressing Esc, <C-d>, <C-x> or <C-c> also have no effect. The only way to return to ZSH is to manually kill the less process.

Image

Notes

  • If only regular keys are pressed (i.e. keys without any modifiers) and the less process is killed, the pressed keys will appear in fzf's prompt, which seems to indicate that fzf is somehow swallowing the key presses that should've gone to less. In the example below, I pressed kl before killing the less process. See that the pressed keys appear in fzf's prompt.

Image

  • The issue is exclusive to Windows, Linux does not present this problem.
  • The issue is reproducible in either Git Bash or Git Bash + ZSH.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions