summaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2025-06-19 01:03:42 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2025-06-19 01:04:59 +0900
commit27258f720723d5de32d483fb6b9ff39608ff9cf9 (patch)
treef062088abb10e467e71ae1495c4000533de722ca /man
parent4d2d6a5ced9ad1ce122c74c2639398a6da9179fc (diff)
downloadfzf-27258f720723d5de32d483fb6b9ff39608ff9cf9.tar.gz
Add {*} placeholder flag
Diffstat (limited to 'man')
-rw-r--r--man/man1/fzf.112
1 files changed, 7 insertions, 5 deletions
diff --git a/man/man1/fzf.1 b/man/man1/fzf.1
index a64b5e0d..df2fba5f 100644
--- a/man/man1/fzf.1
+++ b/man/man1/fzf.1
@@ -789,13 +789,16 @@ fzf also exports \fB$FZF_PREVIEW_TOP\fR and \fB$FZF_PREVIEW_LEFT\fR so that
the preview command can determine the position of the preview window.
A placeholder expression starting with \fB+\fR flag will be replaced to the
-space-separated list of the selected lines (or the current line if no selection
+space-separated list of the selected items (or the current item if no selection
was made) individually quoted.
e.g.
\fBfzf \-\-multi \-\-preview='head \-10 {+}'
git log \-\-oneline | fzf \-\-multi \-\-preview 'git show {+1}'\fR
+Similarly, a placeholder expression starting with \fB*\fR flag will be replaced
+to the space-separated list of all matched items individually quoted.
+
Each expression expands to a quoted string, so that it's safe to pass it as an
argument to an external command. So you should not manually add quotes around
the curly braces. But if you don't want this behavior, you can put
@@ -807,14 +810,13 @@ from the replacement string. To preserve the whitespace, use the \fBs\fR flag.
A placeholder expression with \fBf\fR flag is replaced to the path of
a temporary file that holds the evaluated list. This is useful when you
-multi-select a large number of items and the length of the evaluated string may
+pass a large number of items and the length of the evaluated string may
exceed \fBARG_MAX\fR.
e.g.
- \fB# Press CTRL\-A to select 100K items and see the sum of all the numbers.
+ \fB# See the sum of all the matched numbers
# This won't work properly without 'f' flag due to ARG_MAX limit.
- seq 100000 | fzf \-\-multi \-\-bind ctrl\-a:select\-all \\
- \-\-preview "awk '{sum+=\\$1} END {print sum}' {+f}"\fR
+ seq 100000 | fzf \-\-preview "awk '{sum+=\\$1} END {print sum}' {*f}"\fR
Also,