m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 17:13:42 -05:00

Add reload-sync action

Close #2816
This commit is contained in:
Junegunn Choi
2022-12-29 20:03:51 +09:00
parent 14775aa975
commit 6c37177cf5
6 changed files with 124 additions and 66 deletions

View File

@@ -1019,6 +1019,7 @@ A key or an event can be bound to one or more of the following actions.
\fBrefresh-preview\fR
\fBrebind(...)\fR (rebind bindings after \fBunbind\fR)
\fBreload(...)\fR (see below for the details)
\fBreload-sync(...)\fR (see below for the details)
\fBreplace-query\fR (replace query string with the current selection)
\fBselect\fR
\fBselect-all\fR (select all matches)
@@ -1122,6 +1123,16 @@ e.g.
fzf --bind "change:reload:$RG_PREFIX {q} || true" \\
--ansi --disabled --query "$INITIAL_QUERY"\fR
\fBreload-sync(...)\fR is a synchronous version of \fBreload\fR that replaces
the list only when the command is complete. This is useful when the command
takes a while to produce the initial output and you don't want fzf to run
against an empty list while the command is running.
e.g.
\fB# You can still filter and select entries from the initial list for 3 seconds
seq 100 | fzf --bind 'load:reload-sync(sleep 3; seq 1000)+unbind(load)'\fR
.SS PREVIEW BINDING
With \fBpreview(...)\fR action, you can specify multiple different preview