1fzf(1) fzf - a command-line fuzzy finder fzf(1)
2
3
4
6 fzf - a command-line fuzzy finder
7
8
10 fzf [options]
11
12
14 fzf is a general-purpose command-line fuzzy finder.
15
16
18 Search mode
19 -x, --extended
20 Extended-search mode. Since 0.10.9, this is enabled by default.
21 You can disable it with +x or --no-extended.
22
23 -e, --exact
24 Enable exact-match
25
26 -i Case-insensitive match (default: smart-case match)
27
28 +i Case-sensitive match
29
30 --literal
31 Do not normalize latin script letters for matching.
32
33 --algo=TYPE
34 Fuzzy matching algorithm (default: v2)
35
36 v2 Optimal scoring algorithm (quality)
37 v1 Faster but not guaranteed to find the optimal result
38 (performance)
39
40
41 -n, --nth=N[,..]
42 Comma-separated list of field index expressions for limiting
43 search scope. See FIELD INDEX EXPRESSION for the details.
44
45 --with-nth=N[,..]
46 Transform the presentation of each line using field index
47 expressions
48
49 -d, --delimiter=STR
50 Field delimiter regex for --nth and --with-nth (default: AWK-
51 style)
52
53 --disabled
54 Do not perform search. With this option, fzf becomes a simple
55 selector interface rather than a "fuzzy finder". You can later
56 enable the search using enable-search or toggle-search action.
57
58 Search result
59 +s, --no-sort
60 Do not sort the result
61
62 --tac Reverse the order of the input
63
64 e.g.
65 history | fzf --tac --no-sort
66
67 --tiebreak=CRI[,..]
68 Comma-separated list of sort criteria to apply when the scores
69 are tied.
70
71 length Prefers line with shorter length
72 begin Prefers line with matched substring closer to the begin‐
73 ning
74 end Prefers line with matched substring closer to the end
75 index Prefers line that appeared earlier in the input stream
76
77 - Each criterion should appear only once in the list
78 - index is only allowed at the end of the list
79 - index is implicitly appended to the list when not specified
80 - Default is length (or equivalently length,index)
81 - If end is found in the list, fzf will scan each line backwards
82
83 Interface
84 -m, --multi
85 Enable multi-select with tab/shift-tab. It optionally takes an
86 integer argument which denotes the maximum number of items that
87 can be selected.
88
89 +m, --no-multi
90 Disable multi-select
91
92 --no-mouse
93 Disable mouse
94
95 --bind=KEYBINDS
96 Comma-separated list of custom key bindings. See KEY/EVENT BIND‐
97 INGS for the details.
98
99 --cycle
100 Enable cyclic scroll
101
102 --keep-right
103 Keep the right end of the line visible when it's too long.
104 Effective only when the query string is empty.
105
106 --no-hscroll
107 Disable horizontal scroll
108
109 --hscroll-off=COL
110 Number of screen columns to keep to the right of the highlighted
111 substring (default: 10). Setting it to a large value will cause
112 the text to be positioned on the center of the screen.
113
114 --filepath-word
115 Make word-wise movements and actions respect path separators.
116 The following actions are affected:
117
118 backward-kill-word
119 backward-word
120 forward-word
121 kill-word
122
123 --jump-labels=CHARS
124 Label characters for jump and jump-accept
125
126 Layout
127 --height=HEIGHT[%]
128 Display fzf window below the cursor with the given height
129 instead of using the full screen.
130
131 --min-height=HEIGHT
132 Minimum height when --height is given in percent (default: 10).
133 Ignored when --height is not specified.
134
135 --layout=LAYOUT
136 Choose the layout (default: default)
137
138 default Display from the bottom of the screen
139 reverse Display from the top of the screen
140 reverse-list Display from the top of the screen, prompt at the
141 bottom
142
143
144 --reverse
145 A synonym for --layout=reverse
146
147
148 --border[=STYLE]
149 Draw border around the finder
150
151 rounded Border with rounded corners (default)
152 sharp Border with sharp corners
153 horizontal Horizontal lines above and below the finder
154 vertical Vertical lines on each side of the finder
155 top
156 bottom
157 left
158 right
159
160
161 --no-unicode
162 Use ASCII characters instead of Unicode box drawing characters
163 to draw border
164
165
166 --margin=MARGIN
167 Comma-separated expression for margins around the finder.
168
169 TRBL Same margin for top, right, bottom, and left
170 TB,RL Vertical, horizontal margin
171 T,RL,B Top, horizontal, bottom margin
172 T,R,B,L Top, right, bottom, left margin
173
174 Each part can be given in absolute number or in percentage rela‐
175 tive to the terminal size with % suffix.
176
177 e.g.
178 fzf --margin 10%
179 fzf --margin 1,5%
180
181 --padding=PADDING
182 Comma-separated expression for padding inside the border. Pad‐
183 ding is distinguishable from margin only when --border option is
184 used.
185
186 e.g.
187 fzf --margin 5% --padding 5% --border --preview 'cat {}' \
188 --color bg:#222222,preview-bg:#333333
189
190 TRBL Same padding for top, right, bottom, and left
191 TB,RL Vertical, horizontal padding
192 T,RL,B Top, horizontal, bottom padding
193 T,R,B,L Top, right, bottom, left padding
194
195
196 --info=STYLE
197 Determines the display style of finder info.
198
199 default Display on the next line to the prompt
200 inline Display on the same line
201 hidden Do not display finder info
202
203
204 --no-info
205 A synonym for --info=hidden
206
207
208 --prompt=STR
209 Input prompt (default: '> ')
210
211 --pointer=STR
212 Pointer to the current line (default: '>')
213
214 --marker=STR
215 Multi-select marker (default: '>')
216
217 --header=STR
218 The given string will be printed as the sticky header. The lines
219 are displayed in the given order from top to bottom regardless
220 of --layout option, and are not affected by --with-nth. ANSI
221 color codes are processed even when --ansi is not set.
222
223 --header-lines=N
224 The first N lines of the input are treated as the sticky header.
225 When --with-nth is set, the lines are transformed just like the
226 other lines that follow.
227
228 Display
229 --ansi Enable processing of ANSI color codes
230
231 --tabstop=SPACES
232 Number of spaces for a tab character (default: 8)
233
234 --color=[BASE_SCHEME][,COLOR_NAME[:ANSI_COLOR][:ANSI_ATTRIBUTES]]...
235 Color configuration. The name of the base color scheme is fol‐
236 lowed by custom color mappings.
237
238 BASE SCHEME:
239 (default: dark on 256-color terminal, otherwise 16)
240
241 dark Color scheme for dark 256-color terminal
242 light Color scheme for light 256-color terminal
243 16 Color scheme for 16-color terminal
244 bw No colors (equivalent to --no-color)
245
246 COLOR NAMES:
247 fg Text
248 bg Background
249 preview-fg Preview window text
250 preview-bg Preview window background
251 hl Highlighted substrings
252 fg+ Text (current line)
253 bg+ Background (current line)
254 gutter Gutter on the left (defaults to bg+)
255 hl+ Highlighted substrings (current line)
256 query Query string
257 disabled Query string when search is disabled
258 info Info line (match counters)
259 border Border around the window (--border and --preview)
260 prompt Prompt
261 pointer Pointer to the current line
262 marker Multi-select marker
263 spinner Streaming input indicator
264 header Header
265
266 ANSI COLORS:
267 -1 Default terminal foreground/background color
268 (or the original color of the text)
269 0 ~ 15 16 base colors
270 16 ~ 255 ANSI 256 colors
271 #rrggbb 24-bit colors
272
273 ANSI ATTRIBUTES: (Only applies to foreground colors)
274 regular Clears previously set attributes; should precede
275 the other ones
276 bold
277 underline
278 reverse
279 dim
280 italic
281
282 EXAMPLES:
283
284 # Seoul256 theme with 8-bit colors
285 # (https://github.com/junegunn/seoul256.vim)
286 fzf --color='bg:237,bg+:236,info:143,border:240,spin‐
287 ner:108' \
288 --color='hl:65,fg:252,header:65,fg+:252' \
289 --color='pointer:161,marker:168,prompt:110,hl+:108'
290
291 # Seoul256 theme with 24-bit colors
292 fzf --color='bg:#4B4B4B,bg+:#3F3F3F,info:#BDBB72,bor‐
293 der:#6B6B6B,spinner:#98BC99' \
294 --color='hl:#719872,fg:#D9D9D9,header:#719872,fg+:#D9D9D9'
295 \
296 --color='pointer:#E12672,marker:#E17899,prompt:#98BEDE,hl+:#98BC99'
297
298 --no-bold
299 Do not use bold text
300
301 --black
302 Use black background
303
304 History
305 --history=HISTORY_FILE
306 Load search history from the specified file and update the file
307 on completion. When enabled, CTRL-N and CTRL-P are automati‐
308 cally remapped to next-history and previous-history.
309
310 --history-size=N
311 Maximum number of entries in the history file (default: 1000).
312 The file is automatically truncated when the number of the lines
313 exceeds the value.
314
315 Preview
316 --preview=COMMAND
317 Execute the given command for the current line and display the
318 result on the preview window. {} in the command is the place‐
319 holder that is replaced to the single-quoted string of the cur‐
320 rent line. To transform the replacement string, specify field
321 index expressions between the braces (See FIELD INDEX EXPRESSION
322 for the details).
323
324 e.g.
325 fzf --preview='head -$LINES {}'
326 ls -l | fzf --preview="echo user={3} when={-4..-2}; cat
327 {-1}" --header-lines=1
328
329 fzf exports $FZF_PREVIEW_LINES and $FZF_PREVIEW_COLUMNS so that
330 they represent the exact size of the preview window. (It also
331 overrides $LINES and $COLUMNS with the same values but they can
332 be reset by the default shell, so prefer to refer to the ones
333 with FZF_PREVIEW_ prefix.)
334
335 A placeholder expression starting with + flag will be replaced
336 to the space-separated list of the selected lines (or the cur‐
337 rent line if no selection was made) individually quoted.
338
339 e.g.
340 fzf --multi --preview='head -10 {+}'
341 git log --oneline | fzf --multi --preview 'git show {+1}'
342
343 When using a field index expression, leading and trailing white‐
344 space is stripped from the replacement string. To preserve the
345 whitespace, use the s flag.
346
347 Also, {q} is replaced to the current query string, and {n} is
348 replaced to zero-based ordinal index of the line. Use {+n} if
349 you want all index numbers when multiple lines are selected.
350
351 A placeholder expression with f flag is replaced to the path of
352 a temporary file that holds the evaluated list. This is useful
353 when you multi-select a large number of items and the length of
354 the evaluated string may exceed ARG_MAX.
355
356 e.g.
357 # Press CTRL-A to select 100K items and see the sum of all
358 the numbers.
359 # This won't work properly without 'f' flag due to ARG_MAX
360 limit.
361 seq 100000 | fzf --multi --bind ctrl-a:select-all \
362 --preview "awk '{sum+=} END {print sum}'
363 {+f}"
364
365 Note that you can escape a placeholder pattern by prepending a
366 backslash.
367
368 Preview window will be updated even when there is no match for
369 the current query if any of the placeholder expressions evalu‐
370 ates to a non-empty string.
371
372 Since 0.24.0, fzf can render partial preview content before the
373 preview command completes. ANSI escape sequence for clearing the
374 display (CSI 2 J) is supported, so you can use it to implement
375 preview window that is constantly updating.
376
377 e.g.
378 fzf --preview 'for i in $(seq 100000); do
379 (( i % 200 == 0 )) && printf "\033[2J"
380 echo "$i"
381 sleep 0.01
382 done'
383
384 --preview-window=[POSITION][:SIZE[%]][:rounded|sharp|nobor‐
385 der][:[no]wrap][:[no]follow][:[no]cycle][:[no]hidden][:+SCROLL[OFF‐
386 SETS][/DENOM]][:~HEADER_LINES][:default]
387
388 POSITION: (default: right)
389 up
390 down
391 left
392 right
393
394 Determines the layout of the preview window.
395
396 * If the argument contains :hidden, the preview window will be
397 hidden by default until toggle-preview action is triggered.
398
399 * If size is given as 0, preview window will not be visible, but
400 fzf will still execute the command in the background.
401
402 * Long lines are truncated by default. Line wrap can be enabled
403 with :wrap flag.
404
405 * Preview window will automatically scroll to the bottom when
406 :follow flag is set, similarly to how tail -f works.
407
408 e.g.
409 fzf --preview-window follow --preview 'for i in
410 $(seq 100000); do
411 echo "$i"
412 sleep 0.01
413 (( i % 300 == 0 )) && printf "\033[2J"
414 done'
415
416 * Cyclic scrolling is enabled with :cycle flag.
417
418 * To change the style of the border of the preview window, spec‐
419 ify one of rounded (border with rounded edges, default), sharp
420 (border with sharp edges), or noborder (no border).
421
422 * [:+SCROLL[OFFSETS][/DENOM]] determines the initial scroll off‐
423 set of the preview window.
424
425 - SCROLL can be either a numeric integer or a single-field
426 index expression that refers to a numeric integer.
427
428 - The optional OFFSETS part is for adjusting the base offset.
429 It should be given as a series of signed integers (-INTEGER or
430 +INTEGER).
431
432 - The final /DENOM part is for specifying a fraction of the
433 preview window height.
434
435 * ~HEADER_LINES keeps the top N lines as the fixed header so
436 that they are always visible.
437
438 * default resets all options previously set to the default.
439
440 e.g.
441 # Non-default scroll window positions and sizes
442 fzf --preview="head {}" --preview-window=up:30%
443 fzf --preview="file {}" --preview-window=down:1
444
445 # Initial scroll offset is set to the line number of
446 each line of
447 # git grep output *minus* 5 lines (-5)
448 git grep --line-number '' |
449 fzf --delimiter : --preview 'nl {1}' --preview-
450 window '+{2}-5'
451
452 # Preview with bat, matching line in the middle of
453 the window below
454 # the fixed header of the top 3 lines
455 #
456 # ~3 Top 3 lines as the fixed header
457 # +{2} Base scroll offset extracted from the sec‐
458 ond field
459 # +3 Extra offset to compensate for the 3-line
460 header
461 # /2 Put in the middle of the preview area
462 #
463 git grep --line-number '' |
464 fzf --delimiter : \
465 --preview 'bat --style=full --color=always
466 --highlight-line {2} {1}' \
467 --preview-window '~3:+{2}+3/2'
468
469 # Display top 3 lines as the fixed header
470 fzf --preview 'bat --style=full --color=always {}'
471 --preview-window '~3'
472
473
474 Scripting
475 -q, --query=STR
476 Start the finder with the given query
477
478 -1, --select-1
479 Automatically select the only match
480
481 -0, --exit-0
482 Exit immediately when there's no match
483
484 -f, --filter=STR
485 Filter mode. Do not start interactive finder. When used with
486 --no-sort, fzf becomes a fuzzy-version of grep.
487
488 --print-query
489 Print query as the first line
490
491 --expect=KEY[,..]
492 Comma-separated list of keys that can be used to complete fzf in
493 addition to the default enter key. When this option is set, fzf
494 will print the name of the key pressed as the first line of its
495 output (or as the second line if --print-query is also used).
496 The line will be empty if fzf is completed with the default
497 enter key. If --expect option is specified multiple times, fzf
498 will expect the union of the keys. --no-expect will clear the
499 list.
500
501 e.g.
502 fzf --expect=ctrl-v,ctrl-t,alt-s --expect=f1,f2,~,@
503
504 --read0
505 Read input delimited by ASCII NUL characters instead of newline
506 characters
507
508 --print0
509 Print output delimited by ASCII NUL characters instead of new‐
510 line characters
511
512 --no-clear
513 Do not clear finder interface on exit. If fzf was started in
514 full screen mode, it will not switch back to the original
515 screen, so you'll have to manually run tput rmcup to return.
516 This option can be used to avoid flickering of the screen when
517 your application needs to start fzf multiple times in order.
518
519 --sync Synchronous search for multi-staged filtering. If specified, fzf
520 will launch ncurses finder only after the input stream is com‐
521 plete.
522
523 e.g. fzf --multi | fzf --sync
524
525 --version
526 Display version information and exit
527
528
529 Note that most options have the opposite versions with --no- prefix.
530
531
533 FZF_DEFAULT_COMMAND
534 Default command to use when input is tty. On *nix systems, fzf
535 runs the command with $SHELL -c if SHELL is set, otherwise with
536 sh -c, so in this case make sure that the command is POSIX-com‐
537 pliant.
538
539 FZF_DEFAULT_OPTS
540 Default options. e.g. export FZF_DEFAULT_OPTS="--extended
541 --cycle"
542
543
545 0 Normal exit
546 1 No match
547 2 Error
548 130 Interrupted with CTRL-C or ESC
549
550
552 A field index expression can be a non-zero integer or a range expres‐
553 sion ([BEGIN]..[END]). --nth and --with-nth take a comma-separated list
554 of field index expressions.
555
556
557 Examples
558 1 The 1st field
559 2 The 2nd field
560 -1 The last field
561 -2 The 2nd to last field
562 3..5 From the 3rd field to the 5th field
563 2.. From the 2nd field to the last field
564 ..-3 From the 1st field to the 3rd to the last field
565 .. All the fields
566
567
569 Unless specified otherwise, fzf will start in "extended-search mode".
570 In this mode, you can specify multiple patterns delimited by spaces,
571 such as: 'wild ^music .mp3$ sbtrkt !rmx
572
573 You can prepend a backslash to a space (\ ) to match a literal space
574 character.
575
576
577 Exact-match (quoted)
578 A term that is prefixed by a single-quote character (') is interpreted
579 as an "exact-match" (or "non-fuzzy") term. fzf will search for the
580 exact occurrences of the string.
581
582
583 Anchored-match
584 A term can be prefixed by ^, or suffixed by $ to become an anchored-
585 match term. Then fzf will search for the lines that start with or end
586 with the given string. An anchored-match term is also an exact-match
587 term.
588
589
590 Negation
591 If a term is prefixed by !, fzf will exclude the lines that satisfy the
592 term from the result. In this case, fzf performs exact match by
593 default.
594
595
596 Exact-match by default
597 If you don't prefer fuzzy matching and do not wish to "quote" (prefix‐
598 ing with ') every word, start fzf with -e or --exact option. Note that
599 when --exact is set, '-prefix "unquotes" the term.
600
601
602 OR operator
603 A single bar character term acts as an OR operator. For example, the
604 following query matches entries that start with core and end with
605 either go, rb, or py.
606
607 e.g. ^core go$ | rb$ | py$
608
609
611 --bind option allows you to bind a key or an event to one or more
612 actions. You can use it to customize key bindings or implement dynamic
613 behaviors.
614
615 --bind takes a comma-separated list of binding expressions. Each bind‐
616 ing expression is KEY:ACTION or EVENT:ACTION.
617
618 e.g.
619 fzf --bind=ctrl-j:accept,ctrl-k:kill-line
620
621
622 AVAILABLE KEYS: (SYNONYMS)
623 ctrl-[a-z]
624 ctrl-space
625 ctrl-\
626 ctrl-]
627 ctrl-^ (ctrl-6)
628 ctrl-/ (ctrl-_)
629 ctrl-alt-[a-z]
630 alt-[*] (Any case-sensitive single character is allowed)
631 f[1-12]
632 enter (return ctrl-m)
633 space
634 bspace (bs)
635 alt-up
636 alt-down
637 alt-left
638 alt-right
639 alt-enter
640 alt-space
641 alt-bspace (alt-bs)
642 tab
643 btab (shift-tab)
644 esc
645 del
646 up
647 down
648 left
649 right
650 home
651 end
652 insert
653 pgup (page-up)
654 pgdn (page-down)
655 shift-up
656 shift-down
657 shift-left
658 shift-right
659 alt-shift-up
660 alt-shift-down
661 alt-shift-left
662 alt-shift-right
663 left-click
664 right-click
665 double-click
666 or any single character
667
668
669 AVAILABLE EVENTS:
670 change
671 Triggered whenever the query string is changed
672
673 e.g.
674 # Move cursor to the first entry whenever the query is
675 changed
676 fzf --bind change:first
677
678 backward-eof
679 Triggered when the query string is already empty and you try to
680 delete it backward.
681
682 e.g.
683 fzf --bind backward-eof:abort
684
685
686 AVAILABLE ACTIONS:
687 A key or an event can be bound to one or more of the following actions.
688
689 ACTION: DEFAULT BINDINGS (NOTES):
690 abort ctrl-c ctrl-g ctrl-q esc
691 accept enter double-click
692 accept-non-empty (same as accept except that it prevents
693 fzf from exiting without selection)
694 backward-char ctrl-b left
695 backward-delete-char ctrl-h bspace
696 backward-delete-char/eof (same as backward-delete-char except
697 aborts fzf if query is empty)
698 backward-kill-word alt-bs
699 backward-word alt-b shift-left
700 beginning-of-line ctrl-a home
701 cancel (clear query string if not empty, abort
702 fzf otherwise)
703 change-prompt(...) (change prompt to the given string)
704 clear-screen ctrl-l
705 clear-selection (clear multi-selection)
706 close (close preview window if open, abort fzf
707 otherwise)
708 clear-query (clear query string)
709 delete-char del
710 delete-char/eof ctrl-d (same as delete-char except aborts
711 fzf if query is empty)
712 deselect
713 deselect-all (deselect all matches)
714 disable-search (disable search functionality)
715 down ctrl-j ctrl-n down
716 enable-search (enable search functionality)
717 end-of-line ctrl-e end
718 execute(...) (see below for the details)
719 execute-silent(...) (see below for the details)
720 first (move to the first match)
721 forward-char ctrl-f right
722 forward-word alt-f shift-right
723 ignore
724 jump (EasyMotion-like 2-keystroke movement)
725 jump-accept (jump and accept)
726 kill-line
727 kill-word alt-d
728 last (move to the last match)
729 next-history (ctrl-n on --history)
730 page-down pgdn
731 page-up pgup
732 half-page-down
733 half-page-up
734 preview(...) (see below for the details)
735 preview-down shift-down
736 preview-up shift-up
737 preview-page-down
738 preview-page-up
739 preview-half-page-down
740 preview-half-page-up
741 preview-bottom
742 preview-top
743 previous-history (ctrl-p on --history)
744 print-query (print query and exit)
745 refresh-preview
746 reload(...) (see below for the details)
747 replace-query (replace query string with the current
748 selection)
749 select
750 select-all (select all matches)
751 toggle (right-click)
752 toggle-all (toggle all matches)
753 toggle+down ctrl-i (tab)
754 toggle-in (--layout=reverse* ? toggle+up : tog‐
755 gle+down)
756 toggle-out (--layout=reverse* ? toggle+down : tog‐
757 gle+up)
758 toggle-preview
759 toggle-preview-wrap
760 toggle-search (toggle search functionality)
761 toggle-sort
762 toggle+up btab (shift-tab)
763 unix-line-discard ctrl-u
764 unix-word-rubout ctrl-w
765 up ctrl-k ctrl-p up
766 yank ctrl-y
767
768
769 ACTION COMPOSITION
770 Multiple actions can be chained using + separator.
771
772 e.g.
773 fzf --multi --bind 'ctrl-a:select-all+accept'
774 fzf --multi --bind 'ctrl-a:select-all' --bind 'ctrl-a:+accept'
775
776
777 ACTION ARGUMENT
778 An action denoted with (...) suffix takes an argument.
779
780 e.g.
781 fzf --bind 'ctrl-a:change-prompt(NewPrompt> )'
782 fzf --bind 'ctrl-v:preview(cat {})' --preview-window hidden
783
784 If the argument contains parentheses, fzf may fail to parse the expres‐
785 sion. In that case, you can use any of the following alternative nota‐
786 tions to avoid parse errors.
787
788 action-name[...]
789 action-name~...~
790 action-name!...!
791 action-name@...@
792 action-name#...#
793 action-name$...$
794 action-name%...%
795 action-name^...^
796 action-name&...&
797 action-name*...*
798 action-name;...;
799 action-name/.../
800 action-name|...|
801 action-name:...
802 The last one is the special form that frees you from parse
803 errors as it does not expect the closing character. The catch is
804 that it should be the last one in the comma-separated list of
805 key-action pairs.
806
807
808 COMMAND EXECUTION
809 With execute(...) action, you can execute arbitrary commands without
810 leaving fzf. For example, you can turn fzf into a simple file browser
811 by binding enter key to less command like follows.
812
813 fzf --bind "enter:execute(less {})"
814
815 You can use the same placeholder expressions as in --preview.
816
817 fzf switches to the alternate screen when executing a command. However,
818 if the command is expected to complete quickly, and you are not inter‐
819 ested in its output, you might want to use execute-silent instead,
820 which silently executes the command without the switching. Note that
821 fzf will not be responsive until the command is complete. For asynchro‐
822 nous execution, start your command as a background process (i.e.
823 appending &).
824
825 On *nix systems, fzf runs the command with $SHELL -c if SHELL is set,
826 otherwise with sh -c, so in this case make sure that the command is
827 POSIX-compliant.
828
829
830 RELOAD INPUT
831 reload(...) action is used to dynamically update the input list without
832 restarting fzf. It takes the same command template with placeholder
833 expressions as execute(...).
834
835 See https://github.com/junegunn/fzf/issues/1750 for more info.
836
837 e.g.
838 # Update the list of processes by pressing CTRL-R
839 ps -ef | fzf --bind 'ctrl-r:reload(ps -ef)' --header 'Press CTRL-R
840 to reload' \
841 --header-lines=1 --layout=reverse
842
843 # Integration with ripgrep
844 RG_PREFIX="rg --column --line-number --no-heading --color=always
845 --smart-case "
846 INITIAL_QUERY="foobar"
847 FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY'" \
848 fzf --bind "change:reload:$RG_PREFIX {q} || true" \
849 --ansi --disabled --query "$INITIAL_QUERY"
850
851
852 PREVIEW BINDING
853 With preview(...) action, you can specify multiple different preview
854 commands in addition to the default preview command given by --preview
855 option.
856
857 e.g.
858
859 # Default preview command with an extra preview binding
860 fzf --preview 'file {}' --bind '?:preview:cat {}'
861
862 # A preview binding with no default preview command
863 # (Preview window is initially empty)
864 fzf --bind '?:preview:cat {}'
865
866 # Preview window hidden by default, it appears when you first hit
867 '?'
868 fzf --bind '?:preview:cat {}' --preview-window hidden
869
870
872 Junegunn Choi (junegunn.c@gmail.com)
873
874
876 Project homepage:
877 https://github.com/junegunn/fzf
878
879 Extra Vim plugin:
880 https://github.com/junegunn/fzf.vim
881
882
884 MIT
885
886
887
888fzf 0.26.0 Mar 2021 fzf(1)