From a4745626dd5c5f697dbbc5e3aa1796d5016c1faf Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Wed, 10 Apr 2024 20:11:47 +0900 Subject: Add jump and jump-cancel events Close #3412 # Default behavior fzf --bind space:jump # Same as jump-accept action fzf --bind space:jump,jump:accept # Accept on jump, abort on cancel fzf --bind space:jump,jump:accept,jump-cancel:abort # Change header on jump-cancel fzf --bind 'space:change-header(Type jump label)+jump,jump-cancel:change-header:Jump cancelled' --- man/man1/fzf.1 | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'man/man1/fzf.1') diff --git a/man/man1/fzf.1 b/man/man1/fzf.1 index 2f939f2c..24048e77 100644 --- a/man/man1/fzf.1 +++ b/man/man1/fzf.1 @@ -1160,6 +1160,7 @@ e.g. \fB# Move cursor to the last item and select all items seq 1000 | fzf --multi --sync --bind start:last+select-all\fR .RE + \fIload\fR .RS Triggered when the input stream is complete and the initial processing of the @@ -1169,6 +1170,7 @@ e.g. \fB# Change the prompt to "loaded" when the input stream is complete (seq 10; sleep 1; seq 11 20) | fzf --prompt 'Loading> ' --bind 'load:change-prompt:Loaded> '\fR .RE + \fIresize\fR .RS Triggered when the terminal size is changed. @@ -1176,6 +1178,7 @@ Triggered when the terminal size is changed. e.g. \fBfzf --bind 'resize:transform-header:echo Resized: ${FZF_COLUMNS}x${FZF_LINES}'\fR .RE + \fIresult\fR .RS Triggered when the filtering for the current query is complete and the result list is ready. @@ -1209,6 +1212,7 @@ e.g. # Beware not to introduce an infinite loop seq 10 | fzf --bind 'focus:up' --cycle\fR .RE + \fIone\fR .RS Triggered when there's only one match. \fBone:accept\fR binding is comparable @@ -1220,6 +1224,7 @@ e.g. \fB# Automatically select the only match seq 10 | fzf --bind one:accept\fR .RE + \fIzero\fR .RS Triggered when there's no match. \fBzero:abort\fR binding is comparable to @@ -1241,6 +1246,22 @@ e.g. \fBfzf --bind backward-eof:abort\fR .RE +\fIjump\fR +.RS +Triggered when successfully jumped to the target item in \fB--jump\fR mode. + +e.g. + \fBfzf --bind space:jump,jump:accept\fR +.RE + +\fIjump-cancel\fR +.RS +Triggered when \fB--jump\fR mode is cancelled. + +e.g. + \fBfzf --bind space:jump,jump:accept,jump-cancel:abort\fR +.RE + .SS AVAILABLE ACTIONS: A key or an event can be bound to one or more of the following actions. -- cgit v1.2.3