m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Implement asynchronous transform actions (#4419)

Close #4418

Example:

    fzf --bind 'focus:bg-transform-header(sleep 2; date; echo {})'
This commit is contained in:
Junegunn Choi
2025-06-16 00:39:11 +09:00
committed by GitHub
parent 3b68dcdd81
commit 0c00b203e6
7 changed files with 460 additions and 197 deletions

View File

@@ -1805,6 +1805,9 @@ A key or an event can be bound to one or more of the following actions.
\fBup\fR \fIctrl\-k ctrl\-p up\fR
\fByank\fR \fIctrl\-y\fR
Each \fBtransform*\fR action has a corresponding \fBbg\-transform*\fR
variant that runs the command in the background.
.SS ACTION COMPOSITION
Multiple actions can be chained using \fB+\fR separator.
@@ -1929,6 +1932,14 @@ e.g.
echo "change\-header:Invalid selection"'
\fR
.SS TRANSFORM IN THE BACKGROUND
Transform actions are synchronous, meaning fzf becomes unresponsive while the
command runs. To avoid this, each \fBtransform*\fR action has a corresponding
\fBbg\-transform*\fR variant that runs in the background. Unless you need to
chain multiple transform actions where later ones depend on earlier results,
prefer using the \fBbg\fR variant.
.SS PREVIEW BINDING
With \fBpreview(...)\fR action, you can specify multiple different preview