Add --info-command for customizing the input text

Close #3866
This commit is contained in:
Junegunn Choi
2024-06-20 00:53:18 +09:00
parent d9c028c934
commit 540632bb9e
5 changed files with 110 additions and 22 deletions

View File

@@ -452,6 +452,16 @@ Determines the display style of the finder info. (e.g. match counter, loading in
.BR inline-right:PREFIX " On the right end of the prompt line with a custom prefix"
.br
.TP
.BI "--info-command=" "COMMAND"
Command to generate the finder info. The command runs synchronously and block
the UI until completion, so make sure that it's fast. ANSI color codes are
supported. \fB$FZF_INFO\f$ variable is set to the original info text.
e.g.
\fB# Prepend the current cursor position in yellow
fzf --info-command='echo -e "\\x1b[33;1m$FZF_POS\\x1b[m/$FZF_INFO 💛"'\fR
.TP
.B "--no-info"
A synonym for \fB--info=hidden\fB