fzf icon indicating copy to clipboard operation
fzf copied to clipboard

PIPE-ing stderr in Windows with `--height` causes `--height option is currently not supported on this platform`

Open justfoolingaround opened this issue 2 years ago • 1 comments

  • [x] I have read through the manual page (man fzf)
  • [x] I have the latest version of fzf
  • [x] I have searched through the existing issues

Info

  • OS
    • [ ] Linux
    • [ ] Mac OS X
    • [x] Windows
    • [ ] Etc.
  • Shell
    • [x] bash
    • [ ] zsh
    • [ ] fish

Problem / Steps to reproduce

I'm using cmd and Python for the sake of demonstration, piping to anything else, fzf too will cause the same problem.

fzf --height=50% 2>&1 | py -c "print(__import__('sys').stdin.read())"

Notice that,

fzf --height=50%
fzf --height=50% 2>&1
fzf --height=50% | py -c "print(__import__('sys').stdin.read())"

works just fine.

I'm sorry for the edits, I accidentally hit "New Issue" while typing.

justfoolingaround avatar Jul 08 '22 09:07 justfoolingaround

same behavior on mac

justchokingaround avatar Jul 08 '22 10:07 justchokingaround

fzf prints its UI using STDERR, and prints the selected item to STDOUT. So redirecting STDERR will surely break it.

junegunn avatar Aug 29 '22 06:08 junegunn