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

Revert "Add {*} placeholder flag"

This reverts commit 27258f7207.
This commit is contained in:
Junegunn Choi
2025-06-19 12:39:31 +09:00
parent 27258f7207
commit 16d338da84
4 changed files with 41 additions and 70 deletions

View File

@@ -789,16 +789,13 @@ 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 items (or the current item if no selection
space-separated list of the selected lines (or the current line 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
@@ -810,13 +807,14 @@ 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
pass a large number of items and the length of the evaluated string may
multi-select a large number of items and the length of the evaluated string may
exceed \fBARG_MAX\fR.
e.g.
\fB# See the sum of all the matched numbers
\fB# Press CTRL\-A to select 100K items and see the sum of all the numbers.
# This won't work properly without 'f' flag due to ARG_MAX limit.
seq 100000 | fzf \-\-preview "awk '{sum+=\\$1} END {print sum}' {*f}"\fR
seq 100000 | fzf \-\-multi \-\-bind ctrl\-a:select\-all \\
\-\-preview "awk '{sum+=\\$1} END {print sum}' {+f}"\fR
Also,