-
Hello, Right now, I have a command using fzf, but it's slow to produce the list of elements to filter:
Because of that, nothing happens for a few seconds, before fzf is displayed with the full list of results. Yet, if I run I wanted to have a similar behaviour with fzf, but I couldn't find a way to run something akin to Is there a way to do that? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
: | fzf --bind "start:reload:(sleep 2 && echo hi) || :" |
Beta Was this translation helpful? Give feedback.
-
@LangLangBart : interesting. But what's the difference with |
Beta Was this translation helpful? Give feedback.
-
Thanks @LangLangBart |
Beta Was this translation helpful? Give feedback.
-
Remove The purpose of # Doesn't block
(sleep 2; seq 100) | fzf -q 55
# fzf automatically selects 55 and exits
(sleep 2; seq 100) | fzf -q 55 --select-1
# Because there are more then one matches, fzf starts after 2 seconds
(sleep 2; seq 100) | fzf -q 5 --select-1
# Simliar to --select-1, but it starts the finder immediately
(sleep 2; seq 100) | fzf -q 55 --bind one:accept |
Beta Was this translation helpful? Give feedback.
Remove
--select-1
and fzf will start immediately.The purpose of
--select-1
is to exit without rendering the interactive finder if there's only one match. To determine this, fzf needs some items and until it does, fzf blocks. This is the opposite of what you're trying to achieve.