'How does fzf manage stdin?
fzf fuzzily searches for a needle in a haystack.
Consider the following snippet:
(sleep 5 && printf "this is some\ninput") | fzf
During the sleep, I'm still able to type things to fzf, and it understands them as the needle.
The piped input is correctly segregated, and fzf understand it as the haystack.
How does fzf tell the difference between the two?
Is there somewhere simple in the source code I can look for clarity?
Does this have anything to do with the alternate screen, which I think fzf is using?
Context here is a personally instructive re-implementation of fzf in python. Rough WIP is here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
