Skip to content

Commit fcc4178

Browse files
authored
Updates man page documentation (#4607)
* docs(man): Add example for {+f} in preview command * docs(man): replace echo -e with printf to improve portability across different shells
1 parent cfc37ca commit fcc4178

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

man/man1/fzf.1

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ ENVIRONMENT VARIABLES EXPORTED TO CHILD PROCESSES.
741741

742742
e.g.
743743
\fB# Prepend the current cursor position in yellow
744-
fzf \-\-info\-command='echo \-e "\\x1b[33;1m$FZF_POS\\x1b[m/$FZF_INFO 💛"'\fR
744+
fzf \-\-info\-command='printf "\\x1b[33;1m$FZF_POS\\x1b[m/$FZF_INFO 💛"'\fR
745745

746746
.TP
747747
.B "\-\-no\-info"
@@ -841,6 +841,9 @@ e.g.
841841
# This won't work properly without 'f' flag due to ARG_MAX limit.
842842
seq 100000 | fzf \-\-preview "awk '{sum+=\\$1} END {print sum}' {*f}"\fR
843843

844+
\fB# Use {+f} to get the selected items as a line-separated list
845+
seq 100 | fzf \-\-multi \-\-bind 'enter:become:cat {+f}'\fR
846+
844847
Also,
845848

846849
* \fB{q}\fR is replaced to the current query string
@@ -2106,7 +2109,7 @@ payload of HTTP POST request to the \fB\-\-listen\fR server.
21062109

21072110
e.g.
21082111
\fB# Disallow selecting an empty line
2109-
echo \-e "1. Hello\\n2. Goodbye\\n\\n3. Exit" |
2112+
printf "1. Hello\\n2. Goodbye\\n\\n3. Exit" |
21102113
fzf \-\-height '~100%' \-\-reverse \-\-header 'Select one' \\
21112114
\-\-bind 'enter:transform:[[ \-n {} ]] &&
21122115
echo accept ||

0 commit comments

Comments
 (0)