diff options
| author | Junegunn Choi <junegunn.c@gmail.com> | 2025-06-19 22:35:23 +0900 |
|---|---|---|
| committer | Junegunn Choi <junegunn.c@gmail.com> | 2025-06-19 22:35:23 +0900 |
| commit | dcec6354f5e57be1f8420850c3cfd6a56206c67a (patch) | |
| tree | 098e183bbad04c6d4babbfb16bc9557e7d8fecb6 /man | |
| parent | 16d338da84dda718935c46cbbc54c8c3be9e21a2 (diff) | |
| download | fzf-dcec6354f5e57be1f8420850c3cfd6a56206c67a.tar.gz | |
Add {*} placeholder flag
Diffstat (limited to 'man')
| -rw-r--r-- | man/man1/fzf.1 | 12 |
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, |
