2015-03-25 18:06:31 +00:00
.ig
The MIT License (MIT)
2024-01-01 00:01:43 +00:00
Copyright (c) 2013-2024 Junegunn Choi
2015-03-25 18:06:31 +00:00
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
. .
2024-11-24 09:47:07 +00:00
.TH fzf 1 "Nov 2024" "fzf 0.57.0" "fzf - a command-line fuzzy finder"
2015-03-25 18:06:31 +00:00
.SH NAME
fzf - a command-line fuzzy finder
.SH SYNOPSIS
2024-08-25 13:39:20 +00:00
fzf [\fI options\fR ]
2015-03-25 18:06:31 +00:00
.SH DESCRIPTION
2024-05-20 16:42:37 +00:00
fzf is an interactive filter program for any kind of list.
It implements a "fuzzy" matching algorithm, so you can quickly type in patterns
with omitted characters and still get the results you want.
2015-03-25 18:06:31 +00:00
.SH OPTIONS
2024-03-13 14:59:34 +00:00
.SS Note
.TP
2024-06-24 00:32:35 +00:00
Most long options have the opposite version with \fB \- \- no\- \fR prefix.
2024-03-13 14:59:34 +00:00
2015-03-25 18:06:31 +00:00
.SS Search mode
.TP
2024-06-24 00:32:35 +00:00
.B "\-x, \-\-extended"
2015-11-03 13:49:32 +00:00
Extended-search mode. Since 0.10.9, this is enabled by default. You can disable
2024-06-24 00:32:35 +00:00
it with \fB +x\fR or \fB \- \- no\- extended\fR .
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-e, \-\-exact"
2015-11-03 13:49:32 +00:00
Enable exact-match
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-i, \-\-ignore\-case"
2015-03-25 18:06:31 +00:00
Case-insensitive match (default: smart-case match)
.TP
2024-06-24 00:32:35 +00:00
.B "+i, \-\-no\-ignore\-case"
2015-03-25 18:06:31 +00:00
Case-sensitive match
2016-09-07 00:58:18 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-literal"
2017-01-15 04:22:09 +00:00
Do not normalize latin script letters for matching.
2017-01-08 18:12:23 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-scheme=" SCHEME
2022-08-28 13:16:57 +00:00
Choose scoring scheme tailored for different types of input.
2024-06-05 01:34:44 +00:00
.RS
.B default
.RS
Generic scoring scheme designed to work well with any type of input.
.RE
.RE
.RS
.B path
.RS
Additional bonus point is only given to the characters after path separator.
You might want to choose this scheme over \fB default\fR if you have many files
with spaces in their paths.
.RE
.RE
.RS
.B history
.RS
Scoring scheme well suited for command history or any input where chronological
ordering is important. No additional bonus points are given so that we give
more weight to the chronological ordering. This also sets
2024-06-24 00:32:35 +00:00
\fB \- \- tiebreak=index\fR .
2024-06-05 01:34:44 +00:00
.RE
.RE
2022-08-28 13:16:57 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-algo=" TYPE
2016-09-07 00:58:18 +00:00
Fuzzy matching algorithm (default: v2)
.br
.BR v2 " Optimal scoring algorithm (quality)"
.br
.BR v1 " Faster but not guaranteed to find the optimal result (performance)"
.br
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-n, \-\-nth=" "N[,..]"
2015-03-25 18:06:31 +00:00
Comma-separated list of field index expressions for limiting search scope.
2024-06-19 08:00:30 +00:00
See \fB FIELD INDEX EXPRESSION\fR for the details. When you use this option with
2024-06-24 00:32:35 +00:00
\fB \- \- with\- nth\fR , the field index expressions are calculated against the
transformed lines (unlike in \fB \- \- preview\fR where fields are extracted from
2024-06-19 08:00:30 +00:00
the original lines) because fzf doesn't allow searching against the hidden
fields.
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-with\-nth=" "N[,..]"
2016-06-11 17:15:11 +00:00
Transform the presentation of each line using field index expressions
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-d, \-\-delimiter=" "STR"
Field delimiter regex for \fB \- \- nth\fR , \fB \- \- with\- nth\fR , and field index
2024-06-06 05:19:50 +00:00
expressions (default: AWK-style)
2019-11-12 16:27:39 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-disabled"
2019-11-12 16:27:39 +00:00
Do not perform search. With this option, fzf becomes a simple selector
2021-01-02 15:00:40 +00:00
interface rather than a "fuzzy finder". You can later enable the search using
2024-06-24 00:32:35 +00:00
\fB enable\- search\fR or \fB toggle\- search\fR action.
2015-03-25 18:06:31 +00:00
.SS Search result
.TP
2024-06-24 00:32:35 +00:00
.B "+s, \-\-no\-sort"
2015-03-25 18:06:31 +00:00
Do not sort the result
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-tail=NUM"
2024-06-04 06:48:38 +00:00
Maximum number of items to keep in memory. This is useful when you want to
browse an endless stream of data (e.g. log stream) with fzf while limiting
memory usage.
.RS
e.g.
\fB # Interactive filtering of a log stream
2024-06-24 00:32:35 +00:00
tail \- f *.log | fzf \- \- tail 100000 \- \- tac \- \- no\- sort \- \- exact\fR
2024-06-04 06:48:38 +00:00
.RE
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-track"
2023-03-29 11:36:09 +00:00
Make fzf track the current selection when the result list is updated.
2023-04-22 14:39:35 +00:00
This can be useful when browsing logs using fzf with sorting disabled. It is
2024-06-24 00:32:35 +00:00
not recommended to use this option with \fB \- \- tac\fR as the resulting behavior
2023-04-22 14:39:35 +00:00
can be confusing. Also, consider using \fB track\fR action instead of this
option.
2023-03-29 11:36:09 +00:00
.RS
e.g.
2024-06-24 00:32:35 +00:00
\fB git log \- \- oneline \- \- graph \- \- color=always | nl |
fzf \- \- ansi \- \- track \- \- no\- sort \- \- layout=reverse\- list\fR
2023-03-29 11:36:09 +00:00
.RE
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-tac"
2015-03-25 18:06:31 +00:00
Reverse the order of the input
2016-06-11 17:15:11 +00:00
2015-03-25 18:06:31 +00:00
.RS
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB history | fzf \- \- tac \- \- no\- sort\fR
2015-03-25 18:06:31 +00:00
.RE
2015-04-16 05:19:28 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-tiebreak=" "CRI[,..]"
2016-01-12 18:07:42 +00:00
Comma-separated list of sort criteria to apply when the scores are tied.
2015-04-16 05:19:28 +00:00
.br
2016-02-11 22:46:10 +00:00
2015-04-16 05:19:28 +00:00
.br
2016-06-11 17:15:11 +00:00
.BR length " Prefers line with shorter length"
2015-04-16 05:19:28 +00:00
.br
2022-08-02 04:44:55 +00:00
.BR chunk " Prefers line with shorter matched chunk (delimited by whitespaces)"
.br
2016-06-11 17:15:11 +00:00
.BR begin " Prefers line with matched substring closer to the beginning"
2015-04-16 05:19:28 +00:00
.br
2016-06-11 17:15:11 +00:00
.BR end " Prefers line with matched substring closer to the end"
2015-04-16 05:19:28 +00:00
.br
2016-06-11 17:15:11 +00:00
.BR index " Prefers line that appeared earlier in the input stream"
2015-04-16 05:19:28 +00:00
.br
2016-02-11 22:46:10 +00:00
2016-01-12 18:07:42 +00:00
.br
- Each criterion should appear only once in the list
.br
- \fB index\fR is only allowed at the end of the list
.br
- \fB index\fR is implicitly appended to the list when not specified
.br
- Default is \fB length\fR (or equivalently \fB length\fR ,index)
2016-06-11 17:15:11 +00:00
.br
- If \fB end\fR is found in the list, fzf will scan each line backwards
2015-03-25 18:06:31 +00:00
.SS Interface
.TP
2024-06-24 00:32:35 +00:00
.B "\-m, \-\-multi"
Enable multi-select with tab/shift\- tab. It optionally takes an integer argument
2019-11-12 16:27:39 +00:00
which denotes the maximum number of items that can be selected.
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "+m, \-\-no\-multi"
2017-08-01 12:34:44 +00:00
Disable multi-select
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-mouse"
2015-03-25 18:06:31 +00:00
Disable mouse
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-bind=" "KEYBINDS"
2019-11-12 16:27:39 +00:00
Comma-separated list of custom key bindings. See \fB KEY/EVENT BINDINGS\fR for
the details.
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-cycle"
2016-06-11 17:15:11 +00:00
Enable cyclic scroll
.TP
2024-06-25 08:08:47 +00:00
.B "\-\-wrap"
Enable line wrap
.TP
.BI "\-\-wrap\-sign" "=INDICATOR"
Indicator for wrapped lines. The default is '↳ ' or '> ' depending on
\fB \- \- no\- unicode\fR .
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-multi\-line"
Disable multi-line display of items when using \fB \- \- read0\fR
2024-05-19 16:33:33 +00:00
.TP
2024-10-01 10:15:17 +00:00
.BI "\-\-gap" "[=N]"
Render empty lines between each item
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-keep\-right"
2020-03-11 13:35:24 +00:00
Keep the right end of the line visible when it's too long. Effective only when
the query string is empty.
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-scroll\-off=" "LINES"
2021-11-02 12:18:29 +00:00
Number of screen lines to keep above or below when scrolling to the top or to
2024-05-24 10:25:50 +00:00
the bottom (default: 3).
2021-11-02 12:18:29 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-hscroll"
2016-06-11 17:15:11 +00:00
Disable horizontal scroll
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-hscroll\-off=" "COLS"
2016-06-11 17:15:11 +00:00
Number of screen columns to keep to the right of the highlighted substring
(default: 10). Setting it to a large value will cause the text to be positioned
on the center of the screen.
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-filepath\-word"
2017-01-15 10:42:28 +00:00
Make word-wise movements and actions respect path separators. The following
actions are affected:
2024-06-24 00:32:35 +00:00
\fB backward\- kill\- word\fR
2017-01-15 10:42:28 +00:00
.br
2024-06-24 00:32:35 +00:00
\fB backward\- word\fR
2017-01-15 10:42:28 +00:00
.br
2024-06-24 00:32:35 +00:00
\fB forward\- word\fR
2017-01-15 10:42:28 +00:00
.br
2024-06-24 00:32:35 +00:00
\fB kill\- word\fR
2017-01-15 10:42:28 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-jump\-labels=" "CHARS"
2024-04-13 05:00:16 +00:00
Label characters for \fB jump\fR mode.
2016-06-11 17:15:11 +00:00
.SS Layout
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-height=" "[~]HEIGHT[%]"
2017-01-07 16:30:31 +00:00
Display fzf window below the cursor with the given height instead of using
2023-12-21 09:41:01 +00:00
the full screen.
If a negative value is specified, the height is calculated as the terminal
height minus the given value.
2024-06-24 00:32:35 +00:00
fzf \- \- height=\- 1
2023-12-21 09:41:01 +00:00
When prefixed with \fB ~\fR , fzf will automatically determine the height in the
2024-05-19 16:33:33 +00:00
range according to the input size.
2023-12-21 09:41:01 +00:00
# Will not take up 100% of the screen
2024-06-24 00:32:35 +00:00
seq 5 | fzf \- \- height=~100%
2023-12-21 09:41:01 +00:00
2024-05-19 16:33:33 +00:00
Adaptive height has the following limitations:
.br
* Cannot be used with top/bottom margin and padding given in percent size
.br
* Negative value is not allowed
.br
* It will not find the right size when there are multi-line items
2017-01-07 16:30:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-min\-height=" "HEIGHT"
Minimum height when \fB \- \- height\fR is given in percent (default: 10).
Ignored when \fB \- \- height\fR is not specified.
2024-05-09 16:40:56 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-tmux" "[=[center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]]"
2024-05-28 17:09:32 +00:00
Start fzf in a tmux popup (default \fB center,50%\fR ). Requires tmux 3.3 or
later. This option is ignored if you are not running fzf inside tmux.
2024-05-09 16:40:56 +00:00
e.g.
2024-05-28 17:09:32 +00:00
\fB # Popup in the center with 70% width and height
2024-06-24 00:32:35 +00:00
fzf \- \- tmux 70%
2024-05-09 16:40:56 +00:00
# Popup on the left with 40% width and 100% height
2024-06-24 00:32:35 +00:00
fzf \- \- tmux right,40%
2024-05-09 16:40:56 +00:00
# Popup on the bottom with 100% width and 30% height
2024-06-24 00:32:35 +00:00
fzf \- \- tmux bottom,30%
2024-05-09 16:40:56 +00:00
# Popup on the top with 80% width and 40% height
2024-06-24 00:32:35 +00:00
fzf \- \- tmux top,80%,40%\fR
2024-05-09 16:40:56 +00:00
2018-06-09 16:41:50 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-layout=" "LAYOUT"
2018-06-09 16:41:50 +00:00
Choose the layout (default: default)
.br
2024-06-24 00:32:35 +00:00
.BR default " Display from the bottom of the screen"
2018-06-09 16:41:50 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR reverse " Display from the top of the screen"
2018-06-09 16:41:50 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR reverse\-list " Display from the top of the screen, prompt at the bottom"
2018-06-09 16:41:50 +00:00
.br
2017-01-09 16:04:36 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-reverse"
A synonym for \fB \- \- layout=reverse\fB
2018-06-09 16:41:50 +00:00
2015-03-25 18:06:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-border" [=BORDER_OPT]
2020-03-05 11:15:15 +00:00
Draw border around the finder
.br
2022-08-18 00:19:02 +00:00
.BR rounded " Border with rounded corners (default)"
2020-03-05 11:15:15 +00:00
.br
2022-08-18 00:19:02 +00:00
.BR sharp " Border with sharp corners"
2020-03-05 11:15:15 +00:00
.br
2022-11-06 05:38:31 +00:00
.BR bold " Border with bold lines"
.br
.BR double " Border with double lines"
.br
2023-06-10 05:48:29 +00:00
.BR block " Border using block elements; suitable when using different background colors"
.br
.BR thinblock " Border using legacy computing symbols; may not be displayed on some terminals"
.br
2022-08-18 00:19:02 +00:00
.BR horizontal " Horizontal lines above and below the finder"
2020-03-05 11:15:15 +00:00
.br
2022-08-18 00:19:02 +00:00
.BR vertical " Vertical lines on each side of the finder"
2020-10-26 13:33:41 +00:00
.br
2022-08-18 00:19:02 +00:00
.BR top " (up)"
2020-10-26 13:33:41 +00:00
.br
2022-08-18 00:19:02 +00:00
.BR bottom " (down)"
2020-10-26 13:33:41 +00:00
.br
.BR left
.br
.BR right
.br
2021-04-06 08:37:11 +00:00
.BR none
.br
2019-03-28 17:11:03 +00:00
2023-01-15 16:32:25 +00:00
If you use a terminal emulator where each box-drawing character takes
2024-06-24 00:32:35 +00:00
2 columns, try setting \fB \- \- ambidouble\fR . If the border is still not properly
rendered, set \fB \- \- no\- unicode\fR .
2023-01-15 16:22:02 +00:00
2022-10-29 15:12:01 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-border\-label" [=LABEL]
2022-10-29 15:12:01 +00:00
Label to print on the horizontal border line. Should be used with one of the
2024-06-24 00:32:35 +00:00
following \fB \- \- border\fR options.
2022-10-29 15:12:01 +00:00
.br
.B * rounded
.br
.B * sharp
.br
2022-11-06 05:38:31 +00:00
.B * bold
.br
.B * double
.br
2022-10-29 15:12:01 +00:00
.B * horizontal
.br
.BR "* top" " (up)"
.br
.BR "* bottom" " (down)"
.br
.br
e.g.
\fB # ANSI color codes are supported
# (with https://github.com/busyloop/lolcat)
2024-06-24 00:32:35 +00:00
label=$(curl \- s http://metaphorpsum.com/sentences/1 | lolcat \- f)
2022-10-29 15:12:01 +00:00
# Border label at the center
2024-06-24 00:32:35 +00:00
fzf \- \- height=10 \- \- border \- \- border\- label="╢ $label ╟" \- \- color=label:italic:black
2022-10-29 15:12:01 +00:00
# Left-aligned (positive integer)
2024-06-24 00:32:35 +00:00
fzf \- \- height=10 \- \- border \- \- border\- label="╢ $label ╟" \- \- border\- label\- pos=3 \- \- color=label:italic:black
2022-10-29 15:12:01 +00:00
2022-10-30 15:22:41 +00:00
# Right-aligned (negative integer) on the bottom line (:bottom)
2024-06-24 00:32:35 +00:00
fzf \- \- height=10 \- \- border \- \- border\- label="╢ $label ╟" \- \- border\- label\- pos=\- 3:bottom \- \- color=label:italic:black\fR
2022-10-29 15:12:01 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-border\-label\-pos" [=N[:top|bottom]]
2022-10-30 15:22:41 +00:00
Position of the border label on the border line. Specify a positive integer as
the column position from the left. Specify a negative integer to right-align
the label. Label is printed on the top border line by default, add
\fB :bottom\fR to put it on the border line on the bottom. The default value
\fB 0 (or \fB center\fR ) will put the label at the center of the border line.
2022-10-29 15:12:01 +00:00
2019-03-28 17:11:03 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-unicode"
2022-11-18 01:23:21 +00:00
Use ASCII characters instead of Unicode drawing characters to draw borders,
the spinner and the horizontal separator.
2019-03-28 17:11:03 +00:00
2024-01-20 17:52:28 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-ambidouble"
2024-01-23 14:47:24 +00:00
Set this option if your terminal displays ambiguous width characters (e.g.
box-drawing characters for borders) as 2 columns.
2024-01-20 17:52:28 +00:00
2017-02-04 12:51:22 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-margin=" MARGIN
2015-07-26 14:02:04 +00:00
Comma-separated expression for margins around the finder.
.br
2016-02-11 22:46:10 +00:00
2015-07-26 14:02:04 +00:00
.br
.RS
.BR TRBL " Same margin for top, right, bottom, and left"
.br
.BR TB,RL " Vertical, horizontal margin"
.br
.BR T,RL,B " Top, horizontal, bottom margin"
.br
.BR T,R,B,L " Top, right, bottom, left margin"
.br
2016-02-11 22:46:10 +00:00
2015-07-26 14:02:04 +00:00
.br
Each part can be given in absolute number or in percentage relative to the
terminal size with \fB %\fR suffix.
.br
2016-02-11 22:46:10 +00:00
2015-07-26 14:02:04 +00:00
.br
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- margin 10%
fzf \- \- margin 1,5%\fR
2015-07-26 14:02:04 +00:00
.RE
2020-11-09 11:34:08 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-padding=" PADDING
2020-11-09 11:34:08 +00:00
Comma-separated expression for padding inside the border. Padding is
2024-06-24 00:32:35 +00:00
distinguishable from margin only when \fB \- \- border\fR option is used.
2020-11-09 11:34:08 +00:00
.br
.br
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- margin 5% \- \- padding 5% \- \- border \- \- preview 'cat {}' \\
\- \- color bg:#222222,preview\- bg:#333333\fR
2020-11-09 11:34:08 +00:00
.br
.RS
.BR TRBL " Same padding for top, right, bottom, and left"
.br
.BR TB,RL " Vertical, horizontal padding"
.br
.BR T,RL,B " Top, horizontal, bottom padding"
.br
.BR T,R,B,L " Top, right, bottom, left padding"
.br
.RE
2015-07-26 14:02:04 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-info=" "STYLE"
2024-04-03 15:05:55 +00:00
Determines the display style of the finder info. (e.g. match counter, loading indicator, etc.)
2019-11-14 15:39:29 +00:00
2024-06-24 00:32:35 +00:00
.BR default " On the left end of the horizontal separator"
2019-11-14 15:39:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR right " On the right end of the horizontal separator"
2019-11-14 15:39:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR hidden " Do not display finder info"
2023-06-17 10:15:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR inline " After the prompt with the default prefix ' < '"
2019-11-14 15:39:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR inline:PREFIX " After the prompt with a non-default prefix"
2023-01-24 08:40:08 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR inline\-right " On the right end of the prompt line"
2023-06-10 14:11:05 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR inline\-right:PREFIX " On the right end of the prompt line with a custom prefix"
2019-11-14 15:39:29 +00:00
.br
2024-06-19 15:53:18 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-info\-command=" "COMMAND"
2024-06-19 15:58:51 +00:00
Command to generate the finder info line. The command runs synchronously and
blocks the UI until completion, so make sure that it's fast. ANSI color codes
are supported. \fB $FZF_INFO\fR variable is set to the original info text.
2024-06-20 14:18:28 +00:00
For additional environment variables available to the command, see the section
ENVIRONMENT VARIABLES EXPORTED TO CHILD PROCESSES.
2024-06-19 15:53:18 +00:00
e.g.
\fB # Prepend the current cursor position in yellow
2024-06-24 00:32:35 +00:00
fzf \- \- info\- command='echo \- e "\\ x1b[33;1m$FZF_POS\\ x1b[m/$FZF_INFO 💛"'\fR
2024-06-19 15:53:18 +00:00
2019-11-14 15:39:29 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-info"
A synonym for \fB \- \- info=hidden\fB
2019-11-14 15:39:29 +00:00
2022-11-10 07:23:33 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-separator=" "STR"
2022-11-10 07:23:33 +00:00
The given string will be repeated to form the horizontal separator on the info
2024-06-24 00:32:35 +00:00
line (default: '─' or '\- ' depending on \fB \- \- no\- unicode\fR ).
2022-11-10 07:23:33 +00:00
ANSI color codes are supported.
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-separator"
2022-11-10 07:23:33 +00:00
Do not display horizontal separator on the info line. A synonym for
2024-06-24 00:32:35 +00:00
\fB \- \- separator=''\fB
2022-11-10 07:23:33 +00:00
2023-01-01 05:48:14 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-scrollbar=" "CHAR1[CHAR2]"
2023-01-01 08:38:34 +00:00
Use the given character to render scrollbar. (default: '│' or ':' depending on
2024-06-24 00:32:35 +00:00
\fB \- \- no\- unicode\fR ). The optional \fB CHAR2\fR is used to render scrollbar of
2023-05-16 14:53:10 +00:00
the preview window.
2023-01-01 05:48:14 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-scrollbar"
Do not display scrollbar. A synonym for \fB \- \- scrollbar=''\fB
2023-01-01 05:48:14 +00:00
2015-04-21 14:50:53 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-prompt=" "STR"
2015-03-25 18:06:31 +00:00
Input prompt (default: '> ')
2015-03-28 17:59:32 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-pointer=" "STR"
Pointer to the current line (default: '▌' or '>' depending on \fB \- \- no\- unicode\fR )
2020-02-17 01:19:03 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-marker=" "STR"
Multi-select marker (default: '┃' or '>' depending on \fB \- \- no\- unicode\fR )
2020-02-17 01:19:03 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-marker\-multi\-line=" "STR"
2024-05-26 16:20:56 +00:00
Multi-select marker for multi-line entries. 3 elements for top, middle, and bottom.
2024-06-24 00:32:35 +00:00
(default: '╻┃╹' or '.|'' depending on \fB \- \- no\- unicode\fR )
2024-05-26 16:20:56 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-header=" "STR"
2016-06-11 17:15:11 +00:00
The given string will be printed as the sticky header. The lines are displayed
2024-06-24 00:32:35 +00:00
in the given order from top to bottom regardless of \fB \- \- layout\fR option, and
are not affected by \fB \- \- with\- nth\fR . ANSI color codes are processed even when
\fB \- \- ansi\fR is not set.
2015-03-31 13:05:02 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-header\-lines=" "N"
2016-06-11 17:15:11 +00:00
The first N lines of the input are treated as the sticky header. When
2024-06-24 00:32:35 +00:00
\fB \- \- with\- nth\fR is set, the lines are transformed just like the other
2016-06-11 17:15:11 +00:00
lines that follow.
2021-11-03 12:19:22 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-header\-first"
2021-11-03 12:19:22 +00:00
Print header before the prompt line
2022-03-29 12:35:36 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-ellipsis=" "STR"
2024-08-27 10:39:09 +00:00
Ellipsis to show when line is truncated (default: '··')
2016-06-11 17:15:11 +00:00
.SS Display
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-ansi"
2016-06-11 17:15:11 +00:00
Enable processing of ANSI color codes
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-tabstop=" SPACES
2016-06-11 17:15:11 +00:00
Number of spaces for a tab character (default: 8)
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-color=" "[BASE_SCHEME][,COLOR_NAME[:ANSI_COLOR][:ANSI_ATTRIBUTES]]..."
2016-06-11 17:15:11 +00:00
Color configuration. The name of the base color scheme is followed by custom
2020-10-25 10:29:37 +00:00
color mappings.
2015-06-21 08:40:36 +00:00
.RS
2016-06-11 17:15:11 +00:00
.B BASE SCHEME:
2024-05-20 01:50:00 +00:00
(default: \fB dark\fR on 256-color terminal, otherwise \fB 16\fR ; If \fB NO_COLOR\fR is set, \fB bw\fR )
2015-11-08 16:42:01 +00:00
2016-06-11 17:15:11 +00:00
\fB dark \fR Color scheme for dark 256-color terminal
\fB light \fR Color scheme for light 256-color terminal
\fB 16 \fR Color scheme for 16-color terminal
2024-06-24 00:32:35 +00:00
\fB bw \fR No colors (equivalent to \fB \- \- no\- color\fR )
2015-11-08 16:42:01 +00:00
2020-10-25 10:29:37 +00:00
.B COLOR NAMES:
2023-05-14 09:28:46 +00:00
\fB fg \fR Text
2024-06-24 00:32:35 +00:00
\fB selected\- fg \fR Selected line text
\fB preview\- fg \fR Preview window text
2023-05-14 09:28:46 +00:00
\fB bg \fR Background
2024-06-24 00:32:35 +00:00
\fB selected\- bg \fR Selected line background
\fB preview\- bg \fR Preview window background
2023-05-14 09:28:46 +00:00
\fB hl \fR Highlighted substrings
2024-06-24 00:32:35 +00:00
\fB selected\- hl \fR Highlighted substrings in the selected line
\fB current\- fg (fg+) \fR Text (current line)
\fB current\- bg (bg+) \fR Background (current line)
2023-05-14 09:28:46 +00:00
\fB gutter \fR Gutter on the left
2024-06-24 00:32:35 +00:00
\fB current\- hl (hl+) \fR Highlighted substrings (current line)
2023-05-14 09:28:46 +00:00
\fB query \fR Query string
2024-06-24 00:32:35 +00:00
\fB disabled \fR Query string when search is disabled (\fB \- \- disabled\fR )
2023-05-14 09:28:46 +00:00
\fB info \fR Info line (match counters)
2024-06-24 00:32:35 +00:00
\fB border \fR Border around the window (\fB \- \- border\fR and \fB \- \- preview\fR )
2023-05-14 09:28:46 +00:00
\fB scrollbar \fR Scrollbar
2024-06-24 00:32:35 +00:00
\fB preview\- border \fR Border around the preview window (\fB \- \- preview\fR )
\fB preview\- scrollbar \fR Scrollbar
2023-05-14 09:28:46 +00:00
\fB separator \fR Horizontal separator on info line
2024-06-24 00:32:35 +00:00
\fB label \fR Border label (\fB \- \- border\- label\fR and \fB \- \- preview\- label\fR )
\fB preview\- label \fR Border label of the preview window (\fB \- \- preview\- label\fR )
2023-05-14 09:28:46 +00:00
\fB prompt \fR Prompt
\fB pointer \fR Pointer to the current line
2024-06-24 00:32:35 +00:00
\fB marker \fR Multi\- select marker
2023-05-14 09:28:46 +00:00
\fB spinner \fR Streaming input indicator
\fB header \fR Header
2019-11-12 16:27:39 +00:00
2020-10-25 10:29:37 +00:00
.B ANSI COLORS:
2024-06-24 00:32:35 +00:00
\fB \- 1 \fR Default terminal foreground/background color
2020-10-25 10:29:37 +00:00
\fB \fR (or the original color of the text)
\fB 0 ~ 15 \fR 16 base colors
2021-05-26 10:32:20 +00:00
\fB black\fR
\fB red\fR
\fB green\fR
\fB yellow\fR
\fB blue\fR
\fB magenta\fR
\fB cyan\fR
\fB white\fR
2024-06-24 00:32:35 +00:00
\fB bright\- black\fR (gray | grey)
\fB bright\- red\fR
\fB bright\- green\fR
\fB bright\- yellow\fR
\fB bright\- blue\fR
\fB bright\- magenta\fR
\fB bright\- cyan\fR
\fB bright\- white\fR
2020-10-25 10:29:37 +00:00
\fB 16 ~ 255 \fR ANSI 256 colors
\fB #rrggbb \fR 24-bit colors
.B ANSI ATTRIBUTES: (Only applies to foreground colors)
\fB regular \fR Clears previously set attributes; should precede the other ones
\fB bold\fR
\fB underline\fR
\fB reverse\fR
2020-10-25 15:15:30 +00:00
\fB dim\fR
\fB italic\fR
2022-08-20 21:23:03 +00:00
\fB strikethrough\fR
2020-10-25 10:29:37 +00:00
2019-11-12 16:27:39 +00:00
.B EXAMPLES:
\fB # Seoul256 theme with 8-bit colors
2020-10-25 10:29:37 +00:00
# (https://github.com/junegunn/seoul256.vim)
2024-06-24 00:32:35 +00:00
fzf \- \- color='bg:237,bg+:236,info:143,border:240,spinner:108' \\
\- \- color='hl:65,fg:252,header:65,fg+:252' \\
\- \- color='pointer:161,marker:168,prompt:110,hl+:108'
2019-11-12 16:27:39 +00:00
# Seoul256 theme with 24-bit colors
2024-06-24 00:32:35 +00:00
fzf \- \- color='bg:#4B4B4B,bg+:#3F3F3F,info:#BDBB72,border:#6B6B6B,spinner:#98BC99' \\
\- \- color='hl:#719872,fg:#D9D9D9,header:#719872,fg+:#D9D9D9' \\
\- \- color='pointer:#E12672,marker:#E17899,prompt:#98BEDE,hl+:#98BC99'\fR
2015-06-21 08:40:36 +00:00
.RE
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-highlight\-line"
2024-05-06 16:33:42 +00:00
Highlight the whole current line
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-bold"
2016-11-19 14:13:26 +00:00
Do not use bold text
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-black"
2016-06-11 17:15:11 +00:00
Use black background
.SS History
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-history=" "HISTORY_FILE"
2015-06-21 08:40:36 +00:00
Load search history from the specified file and update the file on completion.
2024-06-24 00:32:35 +00:00
When enabled, \fB CTRL\- N\fR and \fB CTRL\- P\fR are automatically remapped to
\fB next\- history\fR and \fB prev\- history\fR .
2015-06-21 08:40:36 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-history\-size=" "N"
2015-06-21 08:40:36 +00:00
Maximum number of entries in the history file (default: 1000). The file is
automatically truncated when the number of the lines exceeds the value.
2016-06-11 17:15:11 +00:00
.SS Preview
2015-07-21 16:12:50 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-preview=" "COMMAND"
2016-06-11 17:15:11 +00:00
Execute the given command for the current line and display the result on the
2016-10-03 17:17:36 +00:00
preview window. \fB {}\fR in the command is the placeholder that is replaced to
the single-quoted string of the current line. To transform the replacement
string, specify field index expressions between the braces (See \fB FIELD INDEX
2017-01-27 07:38:42 +00:00
EXPRESSION\fR for the details).
2016-06-11 17:15:11 +00:00
.RS
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- preview='head \- $LINES {}'
ls \- l | fzf \- \- preview="echo user={3} when={\- 4..\- 2}; cat {\- 1}" \- \- header\- lines=1\fR
2016-10-03 17:17:36 +00:00
2019-02-22 05:33:29 +00:00
fzf exports \fB $FZF_PREVIEW_LINES\fR and \fB $FZF_PREVIEW_COLUMNS\fR so that
they represent the exact size of the preview window. (It also overrides
\fB $LINES\fR and \fB $COLUMNS\fR with the same values but they can be reset
by the default shell, so prefer to refer to the ones with \fB FZF_PREVIEW_\fR
prefix.)
2017-11-30 18:27:58 +00:00
2023-11-01 16:35:36 +00:00
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.
2017-01-27 07:38:42 +00:00
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
was made) individually quoted.
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- multi \- \- preview='head \- 10 {+}'
git log \- \- oneline | fzf \- \- multi \- \- preview 'git show {+1}'\fR
2017-01-27 07:38:42 +00:00
2018-03-30 02:47:46 +00:00
When using a field index expression, leading and trailing whitespace is stripped
from the replacement string. To preserve the whitespace, use the \fB s\fR flag.
2019-11-12 16:27:39 +00:00
A placeholder expression with \fB f\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
exceed \fB ARG_MAX\fR .
e.g.
2024-06-24 00:32:35 +00:00
\fB # Press CTRL\- A to select 100K items and see the sum of all the numbers.
2019-11-12 16:27:39 +00:00
# This won't work properly without 'f' flag due to ARG_MAX limit.
2024-06-24 00:32:35 +00:00
seq 100000 | fzf \- \- multi \- \- bind ctrl\- a:select\- all \\
\- \- preview "awk '{sum+=\\ $1} END {print sum}' {+f}"\fR
2019-11-12 16:27:39 +00:00
2023-12-25 14:43:46 +00:00
Also,
2024-06-17 08:53:02 +00:00
* \fB {q}\fR is replaced to the current query string
2023-12-25 14:43:46 +00:00
.br
* \fB {n}\fR is replaced to the zero-based ordinal index of the current item.
Use \fB {+n}\fR if you want all index numbers when multiple lines are selected.
.br
2016-10-03 17:17:36 +00:00
Note that you can escape a placeholder pattern by prepending a backslash.
2018-06-09 16:40:22 +00:00
Preview window will be updated even when there is no match for the current
2022-12-30 00:57:10 +00:00
query if any of the placeholder expressions evaluates to a non-empty string
or \fB {q}\fR is in the command template.
2020-10-23 12:37:20 +00:00
Since 0.24.0, fzf can render partial preview content before the preview command
completes. ANSI escape sequence for clearing the display (\fB CSI 2 J\fR ) is
supported, so you can use it to implement preview window that is constantly
updating.
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- preview 'for i in $(seq 100000); do
2020-10-23 12:37:20 +00:00
(( i % 200 == 0 )) && printf "\\ 033[2J"
echo "$i"
sleep 0.01
done'\fR
2023-10-08 16:29:03 +00:00
2023-10-25 15:22:28 +00:00
fzf has experimental support for Kitty graphics protocol and Sixel graphics.
2024-06-24 00:32:35 +00:00
The following example uses https://github.com/junegunn/fzf/blob/master/bin/fzf\- preview.sh
2023-10-25 15:22:28 +00:00
script to render an image using either of the protocols inside the preview window.
2023-10-08 16:29:03 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- preview='fzf\- preview.sh {}'\fR
2023-10-22 16:01:47 +00:00
2016-06-11 17:15:11 +00:00
.RE
2022-10-30 15:22:41 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-preview\-label" [=LABEL]
2022-10-30 15:22:41 +00:00
Label to print on the horizontal border line of the preview window.
2024-06-24 00:32:35 +00:00
Should be used with one of the following \fB \- \- preview\- window\fR options.
2022-10-30 15:22:41 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-rounded (default on non-Windows platforms)
2022-10-30 15:22:41 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-sharp (default on Windows)
2022-10-30 15:22:41 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-bold
2022-11-06 05:38:31 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-double
2022-11-06 05:38:31 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-block
2023-06-10 05:48:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-thinblock
2023-06-10 05:48:29 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-horizontal
2022-10-30 15:22:41 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-top
2022-10-30 15:22:41 +00:00
.br
2024-06-24 00:32:35 +00:00
.B * border\-bottom
2022-10-30 15:22:41 +00:00
.br
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-preview\-label\-pos" [=N[:top|bottom]]
2022-10-30 15:22:41 +00:00
Position of the border label on the border line of the preview window. Specify
a positive integer as the column position from the left. Specify a negative
integer to right-align the label. Label is printed on the top border line by
default, add \fB :bottom\fR to put it on the border line on the bottom. The
default value 0 (or \fB center\fR ) will put the label at the center of the
border line.
2015-07-21 18:21:20 +00:00
.TP
2024-09-12 09:22:07 +00:00
.BI "\-\-preview\-window=" "[POSITION][,SIZE[%]][,border\-BORDER_OPT][,[no]wrap][,[no]follow][,[no]cycle][,[no]info][,[no]hidden][,+SCROLL[OFFSETS][/DENOM]][,~HEADER_LINES][,default][,<SIZE_THRESHOLD(ALTERNATIVE_LAYOUT)]"
2020-10-09 10:53:51 +00:00
.RS
.B POSITION: (default: right)
\fB up
\fB down
\fB left
\fB right
2020-12-05 12:16:35 +00:00
\fR Determines the layout of the preview window.
2016-06-11 17:15:11 +00:00
2020-12-05 12:16:35 +00:00
* If the argument contains \fB :hidden\fR , the preview window will be hidden by
2024-06-24 00:32:35 +00:00
default until \fB toggle\- preview\fR action is triggered.
2020-12-05 12:16:35 +00:00
* If size is given as 0, preview window will not be visible, but fzf will still
2017-01-23 15:23:16 +00:00
execute the command in the background.
2020-12-05 12:16:35 +00:00
* Long lines are truncated by default. Line wrap can be enabled with
2022-07-20 03:08:54 +00:00
\fB wrap\fR flag.
2020-12-05 12:16:35 +00:00
2022-07-20 03:08:54 +00:00
* Preview window will automatically scroll to the bottom when \fB follow\fR
2024-06-24 00:32:35 +00:00
flag is set, similarly to how \fB tail \- f\fR works.
2020-12-05 12:16:35 +00:00
.RS
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- preview\- window follow \- \- preview 'for i in $(seq 100000); do
2020-12-05 12:16:35 +00:00
echo "$i"
sleep 0.01
(( i % 300 == 0 )) && printf "\\ 033[2J"
done'\fR
.RE
2022-07-20 03:08:54 +00:00
* Cyclic scrolling is enabled with \fB cycle\fR flag.
2020-12-05 12:16:35 +00:00
2024-09-12 09:22:07 +00:00
* To hide the scroll offset information on the top right corner, specify
\fB noinfo\fR .
2020-12-05 12:16:35 +00:00
* To change the style of the border of the preview window, specify one of
2024-06-24 00:32:35 +00:00
the options for \fB \- \- border\fR with \fB border\- \fR prefix.
e.g. \fB border\- rounded\fR (border with rounded edges, default),
\fB border\- sharp\fR (border with sharp edges), \fB border\- left\fR ,
\fB border\- none\fR , etc.
2020-08-23 08:05:45 +00:00
2021-03-12 17:24:37 +00:00
* \fB [:+SCROLL[OFFSETS][/DENOM]]\fR determines the initial scroll offset of the
preview window.
2024-11-04 13:27:59 +00:00
- \fB SCROLL\fR can be either a numeric integer or a single-field index expression that refers to a numeric integer or {n} to refer to the zero-based ordinal index of the current item.
2021-03-12 17:24:37 +00:00
2024-06-24 00:32:35 +00:00
- The optional \fB OFFSETS\fR part is for adjusting the base offset. It should be given as a series of signed integers (\fB \- INTEGER\fR or \fB +INTEGER\fR ).
2021-03-12 17:24:37 +00:00
- The final \fB /DENOM\fR part is for specifying a fraction of the preview window height.
2020-07-26 15:15:25 +00:00
2021-03-12 10:51:28 +00:00
* \fB ~HEADER_LINES\fR keeps the top N lines as the fixed header so that they
are always visible.
2020-12-05 12:16:35 +00:00
* \fB default\fR resets all options previously set to the default.
2020-10-10 16:51:39 +00:00
2016-06-11 17:15:11 +00:00
.RS
2019-11-12 16:27:39 +00:00
e.g.
2020-07-26 15:15:25 +00:00
\fB # Non-default scroll window positions and sizes
2024-06-24 00:32:35 +00:00
fzf \- \- preview="head {}" \- \- preview\- window=up,30%
fzf \- \- preview="file {}" \- \- preview\- window=down,1
2020-07-26 15:15:25 +00:00
# Initial scroll offset is set to the line number of each line of
2024-06-24 00:32:35 +00:00
# git grep output *minus* 5 lines (\- 5)
git grep \- \- line\- number '' |
fzf \- \- delimiter : \- \- preview 'nl {1}' \- \- preview\- window '+{2}\- 5'
2021-03-12 17:24:37 +00:00
# Preview with bat, matching line in the middle of the window below
# the fixed header of the top 3 lines
#
# ~3 Top 3 lines as the fixed header
# +{2} Base scroll offset extracted from the second field
# +3 Extra offset to compensate for the 3-line header
# /2 Put in the middle of the preview area
#
2024-06-24 00:32:35 +00:00
git grep \- \- line\- number '' |
fzf \- \- delimiter : \\
\- \- preview 'bat \- \- style=full \- \- color=always \- \- highlight\- line {2} {1}' \\
\- \- preview\- window '~3,+{2}+3/2'
2020-07-26 15:15:25 +00:00
2021-03-12 10:51:28 +00:00
# Display top 3 lines as the fixed header
2024-06-24 00:32:35 +00:00
fzf \- \- preview 'bat \- \- style=full \- \- color=always {}' \- \- preview\- window '~3'\fR
2016-06-11 17:15:11 +00:00
.RE
2020-10-09 10:53:51 +00:00
2022-07-20 03:08:54 +00:00
* You can specify an alternative set of options that are used only when the size
of the preview window is below a certain threshold. Note that only one
alternative layout is allowed.
.RS
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- preview 'cat {}' \- \- preview\- window 'right,border\- left,<30(up,30%,border\- bottom)'\fR
2022-07-20 03:08:54 +00:00
.RE
2015-05-20 16:51:24 +00:00
.SS Scripting
.TP
2024-06-24 00:32:35 +00:00
.BI "\-q, \-\-query=" "STR"
2015-05-20 16:51:24 +00:00
Start the finder with the given query
.TP
2024-06-24 00:32:35 +00:00
.B "\-1, \-\-select\-1"
If there is only one match for the initial query (\fB \- \- query\fR ), do not start
2021-05-22 00:47:02 +00:00
interactive finder and automatically select the only match
2015-05-20 16:51:24 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-0, \-\-exit\-0"
If there is no match for the initial query (\fB \- \- query\fR ), do not start
2021-05-22 00:47:02 +00:00
interactive finder and exit immediately
2015-05-20 16:51:24 +00:00
.TP
2024-06-24 00:32:35 +00:00
.BI "\-f, \-\-filter=" "STR"
Filter mode. Do not start interactive finder. When used with \fB \- \- no\- sort\fR ,
2015-05-20 16:51:24 +00:00
fzf becomes a fuzzy-version of grep.
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-print\-query"
2015-05-20 16:51:24 +00:00
Print query as the first line
.TP
2024-06-24 00:32:35 +00:00
.BI "\-\-expect=" "KEY[,..]"
2015-06-21 08:40:36 +00:00
Comma-separated list of keys that can be used to complete fzf in addition to
the default enter key. When this option is set, fzf will print the name of the
key pressed as the first line of its output (or as the second line if
2024-06-24 00:32:35 +00:00
\fB \- \- print\- query\fR is also used). The line will be empty if fzf is completed
with the default enter key. If \fB \- \- expect\fR option is specified multiple
times, fzf will expect the union of the keys. \fB \- \- no\- expect\fR will clear the
2017-08-26 17:19:39 +00:00
list.
2016-06-11 17:15:11 +00:00
2015-05-20 16:51:24 +00:00
.RS
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- expect=ctrl\- v,ctrl\- t,alt\- s \- \- expect=f1,f2,~,@\fR
2015-05-20 16:51:24 +00:00
.RE
2024-06-01 04:20:12 +00:00
2024-06-24 00:32:35 +00:00
This option is not compatible with \fB \- \- bind\fR on the same key and will take
2024-06-01 04:20:12 +00:00
precedence over it. To combine the two, use \fB print\fR action.
.RS
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- multi \- \- bind 'enter:print()+accept,ctrl\- y:select\- all+print(ctrl\- y)+accept'\fR
2024-06-01 04:20:12 +00:00
.RE
2015-05-20 12:25:15 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-read0"
2017-01-26 02:41:20 +00:00
Read input delimited by ASCII NUL characters instead of newline characters
2016-09-17 19:52:47 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-print0"
2017-01-26 02:41:20 +00:00
Print output delimited by ASCII NUL characters instead of newline characters
2023-08-25 08:59:50 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-no\-clear"
2023-08-25 08:59:50 +00:00
Do not clear finder interface on exit. If fzf was started in full screen mode,
it will not switch back to the original screen, so you'll have to manually run
\fB tput rmcup\fR to return. This option can be used to avoid flickering of the
screen when your application needs to start fzf multiple times in order. (Note
that in most cases, it is preferable to use \fB reload\fR action instead.)
e.g.
2024-06-24 00:32:35 +00:00
\fB foo=$(seq 100 | fzf \- \- no\- clear) || (
2023-08-25 08:59:50 +00:00
# Need to manually switch back to the main screen when cancelled
tput rmcup
exit 1
) && seq "$foo" 100 | fzf
2016-09-17 19:52:47 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-sync"
2015-03-28 19:08:37 +00:00
Synchronous search for multi-staged filtering. If specified, fzf will launch
2024-06-17 08:00:27 +00:00
the finder only after the input stream is complete and the initial filtering
and the associated actions (bound to any of \fB start\fR , \fB load\fR ,
\fB result\fR , or \fB focus\fR ) are complete.
2016-06-11 17:15:11 +00:00
2015-03-25 18:06:31 +00:00
.RS
2024-06-17 08:00:27 +00:00
e.g. \fB # Avoid rendering both fzf instances at the same time
2024-06-24 00:32:35 +00:00
fzf \- \- multi | fzf \- \- sync
2024-06-17 08:00:27 +00:00
# fzf will not render intermediate states
(sleep 1; seq 1000000; sleep 1) |
2024-06-24 00:32:35 +00:00
fzf \- \- sync \- \- query 5 \- \- listen \- \- bind start:up,load:up,result:up,focus:change\- header:Ready\fR
2015-03-25 18:06:31 +00:00
.RE
2017-04-02 02:30:22 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-with\-shell=STR"
2024-04-27 09:36:37 +00:00
Shell command and flags to start child processes with. On *nix Systems, the
2024-06-24 00:32:35 +00:00
default value is \fB $SHELL \- c\fR if \fB $SHELL\fR is set, otherwise \fB sh \- c\fR .
2024-05-06 03:07:51 +00:00
On Windows, the default value is \fB cmd /s/c\fR when \fB $SHELL\fR is not
2024-04-27 09:36:37 +00:00
set.
.RS
2024-06-24 00:32:35 +00:00
e.g. \fB gem list | fzf \- \- with\- shell 'ruby \- e' \- \- preview 'pp Gem::Specification.find_by_name({1})'\fR
2024-04-27 09:36:37 +00:00
.RE
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-listen[=[ADDR:]PORT]" "\-\-listen\-unsafe[=[ADDR:]PORT]"
2023-11-04 07:06:59 +00:00
Start HTTP server and listen on the given address. It allows external processes
2023-11-05 01:50:11 +00:00
to send actions to perform via POST method.
- If the port number is omitted or given as 0, fzf will automatically choose
a port and export it as \fB FZF_PORT\fR environment variable to the child processes
- If \fB FZF_API_KEY\fR environment variable is set, the server would require
2024-06-24 00:32:35 +00:00
sending an API key with the same value in the \fB x\- api\- key\fR HTTP header
2023-11-05 01:50:11 +00:00
- \fB FZF_API_KEY\fR is required for a non-localhost listen address
2024-06-24 00:32:35 +00:00
- To allow remote process execution, use \fB \- \- listen\- unsafe\fR
2022-12-17 15:22:15 +00:00
e.g.
\fB # Start HTTP server on port 6266
2024-06-24 00:32:35 +00:00
fzf \- \- listen 6266
2022-12-17 15:22:15 +00:00
2022-12-25 10:53:53 +00:00
# Send action to the server
2024-06-24 00:32:35 +00:00
curl \- XPOST localhost:6266 \- d 'reload(seq 100)+change\- prompt(hundred> )'
2023-03-19 06:42:47 +00:00
2024-01-21 13:58:18 +00:00
# Get program state in JSON format (experimental)
# * Make sure NOT to access this endpoint from execute/transform actions
# as it will result in a timeout
curl localhost:6266
2023-11-04 07:06:59 +00:00
# Start HTTP server on port 6266 with remote connections allowed
# * Listening on non-localhost address requires using an API key
2024-06-24 00:32:35 +00:00
export FZF_API_KEY="$(head \- c 32 /dev/urandom | base64)"
fzf \- \- listen 0.0.0.0:6266
2023-11-04 07:06:59 +00:00
# Send an authenticated action
2024-06-24 00:32:35 +00:00
curl \- XPOST localhost:6266 \- H "x\- api\- key: $FZF_API_KEY" \- d 'change\- query(yo)'
2023-07-20 14:42:09 +00:00
2023-03-19 06:42:47 +00:00
# Choose port automatically and export it as $FZF_PORT to the child process
2024-06-24 00:32:35 +00:00
fzf \- \- listen \- \- bind 'start:execute\- silent:echo $FZF_PORT > /tmp/fzf\- port'
2022-12-17 15:22:15 +00:00
\fR
2024-05-20 10:33:46 +00:00
.SS Help
2022-12-17 15:22:15 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-version"
2017-04-02 02:30:22 +00:00
Display version information and exit
2024-05-20 10:33:46 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-help"
2024-05-20 10:33:46 +00:00
Show help message
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-man"
2024-05-20 10:33:46 +00:00
Show man page
2015-03-25 18:06:31 +00:00
2024-03-13 11:56:31 +00:00
.SS Directory traversal
2017-08-01 12:34:44 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-walker=[file][,dir][,follow][,hidden]"
2024-03-13 11:56:31 +00:00
Determines the behavior of the built-in directory walker that is used when
\fB $FZF_DEFAULT_COMMAND\fR is not set. The default value is \fB file,follow,hidden\fR .
* \fB file\fR : Include files in the search result
.br
* \fB dir\fR : Include directories in the search result
.br
* \fB hidden\fR : Include and follow hidden directories
.br
* \fB follow\fR : Follow symbolic links
.br
.TP
2024-11-25 10:25:30 +00:00
.B "\-\-walker\-root=DIR [...]"
List of directory names to start the built-in directory walker.
2024-03-13 11:56:31 +00:00
The default value is the current working directory.
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-walker\-skip=DIRS"
2024-03-13 11:56:31 +00:00
Comma-separated list of directory names to skip during the directory walk.
The default value is \fB .git,node_modules\fR .
2024-03-13 14:59:34 +00:00
.SS Shell integration
2024-03-13 11:56:31 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-bash"
2024-03-13 14:59:34 +00:00
Print script to set up Bash shell integration
2024-06-24 00:32:35 +00:00
e.g. \fB eval "$(fzf \- \- bash)"\fR
2024-03-13 14:59:34 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-zsh"
2024-03-13 14:59:34 +00:00
Print script to set up Zsh shell integration
2024-06-24 00:32:35 +00:00
e.g. \fB source <(fzf \- \- zsh)\fR
2024-03-13 14:59:34 +00:00
.TP
2024-06-24 00:32:35 +00:00
.B "\-\-fish"
2024-03-13 14:59:34 +00:00
Print script to set up Fish shell integration
2024-06-24 00:32:35 +00:00
e.g. \fB fzf \- \- fish | source\fR
2017-08-01 12:34:44 +00:00
2016-06-11 17:15:11 +00:00
.SH ENVIRONMENT VARIABLES
2015-03-25 18:06:31 +00:00
.TP
.B FZF_DEFAULT_COMMAND
2018-09-30 13:19:09 +00:00
Default command to use when input is tty. On *nix systems, fzf runs the command
2024-06-24 00:32:35 +00:00
with \fB $SHELL \- c\fR if \fB SHELL\fR is set, otherwise with \fB sh \- c\fR , so in
2021-02-01 11:07:42 +00:00
this case make sure that the command is POSIX-compliant.
2015-03-25 18:06:31 +00:00
.TP
.B FZF_DEFAULT_OPTS
2024-02-29 00:49:33 +00:00
Default options.
.br
2024-06-24 00:32:35 +00:00
e.g. \fB export FZF_DEFAULT_OPTS="\- \- layout=reverse \- \- border \- \- cycle"\fR
2024-02-29 00:49:33 +00:00
.TP
.B FZF_DEFAULT_OPTS_FILE
The location of the file that contains the default options.
.br
e.g. \fB export FZF_DEFAULT_OPTS_FILE=~/.fzfrc\fR
2023-07-20 14:42:09 +00:00
.TP
.B FZF_API_KEY
2024-06-24 00:32:35 +00:00
Can be used to require an API key when using \fB \- \- listen\fR option. If not set,
2023-07-20 14:42:09 +00:00
no authentication will be required by the server. You can set this value if
you need to protect against DNS rebinding and privilege escalation attacks.
2015-03-25 18:06:31 +00:00
.SH EXIT STATUS
.BR 0 " Normal exit"
.br
2016-02-26 14:36:07 +00:00
.BR 1 " No match"
.br
.BR 2 " Error"
.br
2024-05-24 10:32:44 +00:00
.BR 126 " Permission denied error from \fBbecome\fR action"
.br
2024-04-27 09:36:37 +00:00
.BR 127 " Invalid shell command for \fBbecome\fR action"
.br
2024-06-24 00:32:35 +00:00
.BR 130 " Interrupted with \fBCTRL\-C\fR or \fBESC\fR"
2015-03-25 18:06:31 +00:00
.SH FIELD INDEX EXPRESSION
A field index expression can be a non-zero integer or a range expression
2024-06-24 00:32:35 +00:00
([BEGIN]..[END]). \fB \- \- nth\fR and \fB \- \- with\- nth\fR take a comma-separated list
2015-03-25 18:06:31 +00:00
of field index expressions.
.SS Examples
.BR 1 " The 1st field"
.br
.BR 2 " The 2nd field"
.br
2024-06-24 00:32:35 +00:00
.BR \- 1 " The last field"
2015-03-25 18:06:31 +00:00
.br
2024-06-24 00:32:35 +00:00
.BR \- 2 " The 2nd to last field"
2015-03-25 18:06:31 +00:00
.br
.BR 3 ..5 " From the 3rd field to the 5th field"
.br
.BR 2 .. " From the 2nd field to the last field"
.br
2024-06-24 00:32:35 +00:00
.BR ..\-3 " From the 1st field to the 3rd to the last field"
2015-03-25 18:06:31 +00:00
.br
.BR .. " All the fields"
.br
2024-01-16 05:17:56 +00:00
.SH ENVIRONMENT VARIABLES EXPORTED TO CHILD PROCESSES
fzf exports the following environment variables to its child processes.
.BR FZF_LINES " Number of lines fzf takes up excluding padding and margin"
.br
.BR FZF_COLUMNS " Number of columns fzf takes up excluding padding and margin"
.br
.BR FZF_TOTAL_COUNT " Total number of items"
.br
.BR FZF_MATCH_COUNT " Number of matched items"
.br
.BR FZF_SELECT_COUNT " Number of selected items"
.br
2024-04-27 09:56:23 +00:00
.BR FZF_POS " Vertical position of the cursor in the list starting from 1"
.br
2024-01-16 05:17:56 +00:00
.BR FZF_QUERY " Current query string"
.br
.BR FZF_PROMPT " Prompt string"
.br
2024-03-29 07:14:08 +00:00
.BR FZF_PREVIEW_LABEL " Preview label string"
.br
.BR FZF_BORDER_LABEL " Border label string"
.br
2024-01-16 05:17:56 +00:00
.BR FZF_ACTION " The name of the last action performed"
.br
2024-04-13 05:00:16 +00:00
.BR FZF_KEY " The name of the last key pressed"
.br
2024-06-24 00:32:35 +00:00
.BR FZF_PORT " Port number when \-\-listen option is used"
2024-01-16 05:17:56 +00:00
.br
.BR FZF_PREVIEW_TOP " Top position of the preview window"
.br
.BR FZF_PREVIEW_LEFT " Left position of the preview window"
.br
.BR FZF_PREVIEW_LINES " Number of lines in the preview window"
.br
.BR FZF_PREVIEW_COLUMNS " Number of columns in the preview window"
2015-03-25 18:06:31 +00:00
.SH EXTENDED SEARCH MODE
2024-06-24 00:32:35 +00:00
Unless specified otherwise, fzf will start in "extended\- search mode". In this
2015-11-03 13:49:32 +00:00
mode, you can specify multiple patterns delimited by spaces, such as: \fB 'wild
^music .mp3$ sbtrkt !rmx\fR
2015-03-25 18:06:31 +00:00
2017-08-26 18:32:21 +00:00
You can prepend a backslash to a space (\fB \\ \fR ) to match a literal space
character.
2024-06-24 00:32:35 +00:00
.SS Exact\-match (quoted)
2015-09-12 04:31:07 +00:00
A term that is prefixed by a single-quote character (\fB '\fR ) is interpreted as
2024-06-24 00:32:35 +00:00
an "exact\- match" (or "non\- fuzzy") term. fzf will search for the exact
2015-09-12 04:31:07 +00:00
occurrences of the string.
2015-03-25 18:06:31 +00:00
2024-06-24 00:32:35 +00:00
.SS Anchored\-match
2015-09-12 04:31:07 +00:00
A term can be prefixed by \fB ^\fR , or suffixed by \fB $\fR to become an
2016-06-11 17:15:11 +00:00
anchored-match term. Then fzf will search for the lines that start with or end
2015-09-12 04:31:07 +00:00
with the given string. An anchored-match term is also an exact-match term.
2015-03-25 18:06:31 +00:00
2024-08-16 09:20:55 +00:00
.SS Exact\-boundary\-match (quoted both ends)
A single-quoted term is interpreted as an "exact\- boundary\- match". fzf will
search for the exact occurrences of the string with both ends at the word
boundaries. Unlike in regular expressions, this also sees an underscore as
a word boundary. But the words around underscores are ranked lower and appear
later in the result than the other words around the other types of word
boundaries.
1. xxx foo xxx (highest score)
.br
2. xxx foo_xxx
.br
3. xxx_foo xxx
.br
4. xxx_foo_xxx (lowest score)
2015-03-25 18:06:31 +00:00
.SS Negation
2016-06-11 17:15:11 +00:00
If a term is prefixed by \fB !\fR , fzf will exclude the lines that satisfy the
2016-10-03 17:17:36 +00:00
term from the result. In this case, fzf performs exact match by default.
2015-03-25 18:06:31 +00:00
2024-06-24 00:32:35 +00:00
.SS Exact\-match by default
2015-09-12 04:31:07 +00:00
If you don't prefer fuzzy matching and do not wish to "quote" (prefixing with
2024-06-24 00:32:35 +00:00
\fB '\fR ) every word, start fzf with \fB \- e\fR or \fB \- \- exact\fR option. Note that
when \fB \- \- exact\fR is set, \fB '\fR \- prefix "unquotes" the term.
2015-03-25 18:06:31 +00:00
2015-11-08 15:58:20 +00:00
.SS OR operator
A single bar character term acts as an OR operator. For example, the following
query matches entries that start with \fB core\fR and end with either \fB go\fR ,
\fB rb\fR , or \fB py\fR .
e.g. \fB ^core go$ | rb$ | py$\fR
2019-11-12 16:27:39 +00:00
.SH KEY/EVENT BINDINGS
2024-06-24 00:32:35 +00:00
\fB \- \- bind\fR option allows you to bind \fB a key\fR or \fB an event\fR to one or
2019-11-12 16:27:39 +00:00
more \fB actions\fR . You can use it to customize key bindings or implement
dynamic behaviors.
2024-06-24 00:32:35 +00:00
\fB \- \- bind\fR takes a comma-separated list of binding expressions. Each binding
2019-11-12 16:27:39 +00:00
expression is \fB KEY:ACTION\fR or \fB EVENT:ACTION\fR .
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind=ctrl\- j:accept,ctrl\- k:kill\- line\fR
2019-11-12 16:27:39 +00:00
.SS AVAILABLE KEYS: (SYNONYMS)
2024-06-24 00:32:35 +00:00
\fI ctrl\-[a\-z] \fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- space\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- delete\fR
2023-05-21 09:40:05 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- \\ \fR
2019-11-14 13:39:25 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- ]\fR
2019-11-14 13:39:25 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- ^\fR (\fI ctrl\- 6\fR )
2019-11-14 13:39:25 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- /\fR (\fI ctrl\- _\fR )
2019-11-14 13:39:25 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI ctrl\- alt\-[a\-z] \fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\-[*] \fR (Any case-sensitive single character is allowed)
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI f[1\- 12]\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI enter\fR (\fI return\fR \fI ctrl\- m\fR )
2019-11-12 16:27:39 +00:00
.br
\fI space\fR
.br
2024-04-13 05:00:16 +00:00
\fI backspace\fR (\fI bspace\fR \fI bs\fR )
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- up\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- down\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- left\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- right\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- enter\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- space\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- backspace\fR (\fI alt\- bspace\fR \fI alt\- bs\fR )
2019-11-12 16:27:39 +00:00
.br
\fI tab\fR
.br
2024-06-24 00:32:35 +00:00
\fI shift\- tab\fR (\fI btab\fR )
2019-11-12 16:27:39 +00:00
.br
\fI esc\fR
.br
2024-04-13 05:00:16 +00:00
\fI delete\fR (\fI del\fR )
2019-11-12 16:27:39 +00:00
.br
\fI up\fR
.br
\fI down\fR
.br
\fI left\fR
.br
\fI right\fR
.br
\fI home\fR
.br
\fI end\fR
.br
2020-02-23 16:43:19 +00:00
\fI insert\fR
.br
2024-06-24 00:32:35 +00:00
\fI page\- up\fR (\fI pgup\fR )
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI page\- down\fR (\fI pgdn\fR )
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- up\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- down\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- left\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- right\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- delete\fR
2023-05-21 09:40:05 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- shift\- up\fR
2020-11-24 10:36:58 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- shift\- down\fR
2020-11-24 10:36:58 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- shift\- left\fR
2020-11-24 10:36:58 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI alt\- shift\- right\fR
2020-11-24 10:36:58 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI left\- click\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI right\- click\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI double\- click\fR
2019-11-12 16:27:39 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI scroll\- up\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI scroll\- down\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI preview\- scroll\- up\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI preview\- scroll\- down\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- left\- click\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- right\- click\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- scroll\- up\fR
2023-10-10 09:58:22 +00:00
.br
2024-06-24 00:32:35 +00:00
\fI shift\- scroll\- down\fR
2023-10-10 09:58:22 +00:00
.br
2019-11-12 16:27:39 +00:00
or any single character
.SS AVAILABLE EVENTS:
2022-10-26 15:33:05 +00:00
\fI start\fR
.RS
Triggered only once when fzf finder starts. Since fzf consumes the input stream
2024-06-24 00:32:35 +00:00
asynchronously, the input list is not available unless you use \fI \- \- sync\fR .
2022-10-26 15:33:05 +00:00
e.g.
\fB # Move cursor to the last item and select all items
2024-06-24 00:32:35 +00:00
seq 1000 | fzf \- \- multi \- \- sync \- \- bind start:last+select\- all\fR
2022-10-26 15:33:05 +00:00
.RE
2024-04-10 11:11:47 +00:00
2022-12-29 11:01:50 +00:00
\fI load\fR
.RS
Triggered when the input stream is complete and the initial processing of the
list is complete.
e.g.
\fB # Change the prompt to "loaded" when the input stream is complete
2024-06-24 00:32:35 +00:00
(seq 10; sleep 1; seq 11 20) | fzf \- \- prompt 'Loading> ' \- \- bind 'load:change\- prompt:Loaded> '\fR
2022-12-29 11:01:50 +00:00
.RE
2024-04-10 11:11:47 +00:00
2024-01-21 06:29:53 +00:00
\fI resize\fR
.RS
Triggered when the terminal size is changed.
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind 'resize:transform\- header:echo Resized: ${FZF_COLUMNS}x${FZF_LINES}'\fR
2024-01-21 06:29:53 +00:00
.RE
2024-04-10 11:11:47 +00:00
2024-01-07 08:44:49 +00:00
\fI result\fR
.RS
Triggered when the filtering for the current query is complete and the result list is ready.
e.g.
\fB # Put the cursor on the second item when the query string is empty
# * Note that you can't use 'change' event in this case because the second position may not be available
2024-06-24 00:32:35 +00:00
fzf \- \- sync \- \- bind 'result:transform:[[ \- z {q} ]] && echo "pos(2)"'\fR
2024-01-07 08:44:49 +00:00
.RE
2020-06-07 14:07:03 +00:00
\fI change\fR
.RS
Triggered whenever the query string is changed
e.g.
2020-12-29 16:51:25 +00:00
\fB # Move cursor to the first entry whenever the query is changed
2024-06-24 00:32:35 +00:00
fzf \- \- bind change:first\fR
2020-06-07 14:07:03 +00:00
.RE
2023-01-23 07:22:25 +00:00
\fI focus\fR
.RS
Triggered when the focus changes due to a vertical cursor movement or a search
result update.
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind 'focus:transform\- preview\- label:echo [ {} ]' \- \- preview 'cat {}'
2023-01-23 07:22:25 +00:00
# Any action bound to the event runs synchronously and thus can make the interface sluggish
# e.g. lolcat isn't one of the fastest programs, and every cursor movement in
# fzf will be noticeably affected by its execution time
2024-06-24 00:32:35 +00:00
fzf \- \- bind 'focus:transform\- preview\- label:echo [ {} ] | lolcat \- f' \- \- preview 'cat {}'
2023-01-23 07:22:25 +00:00
# Beware not to introduce an infinite loop
2024-06-24 00:32:35 +00:00
seq 10 | fzf \- \- bind 'focus:up' \- \- cycle\fR
2023-01-23 07:22:25 +00:00
.RE
2024-04-10 11:11:47 +00:00
2023-04-01 08:16:02 +00:00
\fI one\fR
.RS
Triggered when there's only one match. \fB one:accept\fR binding is comparable
2024-06-24 00:32:35 +00:00
to \fB \- \- select\- 1\fR option, but the difference is that \fB \- \- select\- 1\fR is only
2023-04-01 08:16:02 +00:00
effective before the interactive finder starts but \fB one\fR event is triggered
by the interactive finder.
e.g.
\fB # Automatically select the only match
2024-06-24 00:32:35 +00:00
seq 10 | fzf \- \- bind one:accept\fR
2023-04-01 08:16:02 +00:00
.RE
2024-04-10 11:11:47 +00:00
2023-04-26 06:13:08 +00:00
\fI zero\fR
.RS
Triggered when there's no match. \fB zero:abort\fR binding is comparable to
2024-06-24 00:32:35 +00:00
\fB \- \- exit\- 0\fR option, but the difference is that \fB \- \- exit\- 0\fR is only
2023-04-26 06:13:08 +00:00
effective before the interactive finder starts but \fB zero\fR event is
triggered by the interactive finder.
e.g.
\fB # Reload the candidate list when there's no match
2024-06-24 00:32:35 +00:00
echo $RANDOM | fzf \- \- bind 'zero:reload(echo $RANDOM)+clear\- query' \- \- height 3\fR
2023-04-26 06:13:08 +00:00
.RE
2019-11-12 16:27:39 +00:00
2024-06-24 00:32:35 +00:00
\fI backward\- eof\fR
2020-06-07 14:07:03 +00:00
.RS
Triggered when the query string is already empty and you try to delete it
backward.
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind backward\- eof:abort\fR
2020-06-07 14:07:03 +00:00
.RE
2019-11-12 16:27:39 +00:00
2024-04-10 11:11:47 +00:00
\fI jump\fR
.RS
2024-04-13 05:00:16 +00:00
Triggered when successfully jumped to the target item in \fB jump\fR mode.
2024-04-10 11:11:47 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind space:jump,jump:accept\fR
2024-04-10 11:11:47 +00:00
.RE
2024-06-24 00:32:35 +00:00
\fI jump\- cancel\fR
2024-04-10 11:11:47 +00:00
.RS
2024-04-13 05:00:16 +00:00
Triggered when \fB jump\fR mode is cancelled.
2024-04-10 11:11:47 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind space:jump,jump:accept,jump\- cancel:abort\fR
2024-04-10 11:11:47 +00:00
.RE
2024-06-24 00:32:35 +00:00
\fI click\- header\fR
2024-05-05 09:56:43 +00:00
.RS
2024-05-06 00:27:58 +00:00
Triggered when a mouse click occurs within the header. Sets \fB FZF_CLICK_HEADER_LINE\fR and \fB FZF_CLICK_HEADER_COLUMN\fR environment variables starting from 1.
2024-05-05 09:56:43 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB printf "head1\\ nhead2" | fzf \- \- header\- lines=2 \- \- bind 'click\- header:transform\- prompt:printf ${FZF_CLICK_HEADER_LINE}x${FZF_CLICK_HEADER_COLUMN}'\fR
2024-05-05 09:56:43 +00:00
.RE
2019-11-12 16:27:39 +00:00
.SS AVAILABLE ACTIONS:
A key or an event can be bound to one or more of the following actions.
2017-05-22 08:07:05 +00:00
2023-01-21 16:56:29 +00:00
\fB ACTION: DEFAULT BINDINGS (NOTES):
2024-06-24 00:32:35 +00:00
\fB abort\fR \fI ctrl\- c ctrl\- g ctrl\- q esc\fR
\fB accept\fR \fI enter double\- click\fR
\fB accept\- non\- empty\fR (same as \fB accept\fR except that it prevents fzf from exiting without selection)
\fB accept\- or\- print\- query\fR (same as \fB accept\fR except that it prints the query when there's no match)
\fB backward\- char\fR \fI ctrl\- b left\fR
\fB backward\- delete\- char\fR \fI ctrl\- h bspace\fR
\fB backward\- delete\- char/eof\fR (same as \fB backward\- delete\- char\fR except aborts fzf if query is empty)
\fB backward\- kill\- word\fR \fI alt\- bs\fR
\fB backward\- word\fR \fI alt\- b shift\- left\fR
2023-02-11 11:21:10 +00:00
\fB become(...)\fR (replace fzf process with the specified command; see below for the details)
2024-06-24 00:32:35 +00:00
\fB beginning\- of\- line\fR \fI ctrl\- a home\fR
2023-01-21 16:56:29 +00:00
\fB cancel\fR (clear query string if not empty, abort fzf otherwise)
2024-06-24 00:32:35 +00:00
\fB change\- border\- label(...)\fR (change \fB \- \- border\- label\fR to the given string)
\fB change\- header(...)\fR (change header to the given string; doesn't affect \fB \- \- header\- lines\fR )
\fB change\- multi\fR (enable multi-select mode with no limit)
\fB change\- multi(...)\fR (enable multi-select mode with a limit or disable it with 0)
\fB change\- preview(...)\fR (change \fB \- \- preview\fR option)
\fB change\- preview\- label(...)\fR (change \fB \- \- preview\- label\fR to the given string)
\fB change\- preview\- window(...)\fR (change \fB \- \- preview\- window\fR option; rotate through the multiple option sets separated by '|')
\fB change\- prompt(...)\fR (change prompt to the given string)
\fB change\- query(...)\fR (change query string to the given string)
\fB clear\- screen\fR \fI ctrl\- l\fR
\fB clear\- selection\fR (clear multi\- selection)
2023-01-21 16:56:29 +00:00
\fB close\fR (close preview window if open, abort fzf otherwise)
2024-06-24 00:32:35 +00:00
\fB clear\- query\fR (clear query string)
\fB delete\- char\fR \fI del\fR
\fB delete\- char/eof\fR \fI ctrl\- d\fR (same as \fB delete\- char\fR except aborts fzf if query is empty)
2021-02-25 12:14:15 +00:00
\fB deselect\fR
2024-06-24 00:32:35 +00:00
\fB deselect\- all\fR (deselect all matches)
\fB disable\- search\fR (disable search functionality)
\fB down\fR \fI ctrl\- j ctrl\- n down\fR
\fB enable\- search\fR (enable search functionality)
\fB end\- of\- line\fR \fI ctrl\- e end\fR
2023-01-21 16:56:29 +00:00
\fB execute(...)\fR (see below for the details)
2024-06-24 00:32:35 +00:00
\fB execute\- silent(...)\fR (see below for the details)
2023-01-21 16:56:29 +00:00
\fB first\fR (move to the first match; same as \fB pos(1)\fR )
2024-06-24 00:32:35 +00:00
\fB forward\- char\fR \fI ctrl\- f right\fR
\fB forward\- word\fR \fI alt\- f shift\- right\fR
2016-06-11 17:15:11 +00:00
\fB ignore\fR
2023-01-21 16:56:29 +00:00
\fB jump\fR (EasyMotion-like 2-keystroke movement)
2024-06-24 00:32:35 +00:00
\fB kill\- line\fR
\fB kill\- word\fR \fI alt\- d\fR
\fB last\fR (move to the last match; same as \fB pos(\- 1)\fR )
\fB next\- history\fR (\fI ctrl\- n\fR on \fB \- \- history\fR )
\fB next\- selected\fR (move to the next selected item)
\fB page\- down\fR \fI pgdn\fR
\fB page\- up\fR \fI pgup\fR
\fB half\- page\- down\fR
\fB half\- page\- up\fR
\fB hide\- header\fR
\fB hide\- preview\fR
\fB offset\- down\fR (similar to CTRL\- E of Vim)
\fB offset\- up\fR (similar to CTRL\- Y of Vim)
\fB offset\- middle\fR (place the current item is in the middle of the screen)
2023-01-21 16:56:29 +00:00
\fB pos(...)\fR (move cursor to the numeric position; negative number to count from the end)
2024-06-24 00:32:35 +00:00
\fB prev\- history\fR (\fI ctrl\- p\fR on \fB \- \- history\fR )
\fB prev\- selected\fR (move to the previous selected item)
2023-01-21 16:56:29 +00:00
\fB preview(...)\fR (see below for the details)
2024-06-24 00:32:35 +00:00
\fB preview\- down\fR \fI shift\- down\fR
\fB preview\- up\fR \fI shift\- up\fR
\fB preview\- page\- down\fR
\fB preview\- page\- up\fR
\fB preview\- half\- page\- down\fR
\fB preview\- half\- page\- up\fR
\fB preview\- bottom\fR
\fB preview\- top\fR
2024-05-22 13:18:24 +00:00
\fB print(...)\fR (add string to the output queue and print on exit)
2023-01-21 16:56:29 +00:00
\fB put\fR (put the character to the prompt)
\fB put(...)\fR (put the given string to the prompt)
2024-06-24 00:32:35 +00:00
\fB refresh\- preview\fR
2023-01-21 16:56:29 +00:00
\fB rebind(...)\fR (rebind bindings after \fB unbind\fR )
\fB reload(...)\fR (see below for the details)
2024-06-24 00:32:35 +00:00
\fB reload\- sync(...)\fR (see below for the details)
\fB replace\- query\fR (replace query string with the current selection)
2021-02-25 12:14:15 +00:00
\fB select\fR
2024-06-24 00:32:35 +00:00
\fB select\- all\fR (select all matches)
\fB show\- header\fR
\fB show\- preview\fR
\fB toggle\fR (\fI right\- click\fR )
\fB toggle\- all\fR (toggle all matches)
\fB toggle+down\fR \fI ctrl\- i (tab)\fR
\fB toggle\- header\fR
\fB toggle\- in\fR (\fB \- \- layout=reverse*\fR ? \fB toggle+up\fR : \fB toggle+down\fR )
\fB toggle\- out\fR (\fB \- \- layout=reverse*\fR ? \fB toggle+down\fR : \fB toggle+up\fR )
\fB toggle\- preview\fR
\fB toggle\- preview\- wrap\fR
\fB toggle\- search\fR (toggle search functionality)
\fB toggle\- sort\fR
\fB toggle\- track\fR (toggle global tracking option (\fB \- \- track\fR ))
\fB toggle\- track\- current\fR (toggle tracking of the current item)
2024-07-06 05:10:02 +00:00
\fB toggle\- wrap\fR \fI ctrl\- /\fR \fI alt\- /\fR
2024-06-24 00:32:35 +00:00
\fB toggle+up\fR \fI btab (shift\- tab)\fR
\fB track\- current\fR (track the current item; automatically disabled if focus changes)
2023-12-26 03:20:27 +00:00
\fB transform(...)\fR (transform states using the output of an external command)
2024-06-24 00:32:35 +00:00
\fB transform\- border\- label(...)\fR (transform border label using an external command)
\fB transform\- header(...)\fR (transform header using an external command)
\fB transform\- preview\- label(...)\fR (transform preview label using an external command)
\fB transform\- prompt(...)\fR (transform prompt string using an external command)
\fB transform\- query(...)\fR (transform query string using an external command)
2023-01-21 16:56:29 +00:00
\fB unbind(...)\fR (unbind bindings)
2024-06-24 00:32:35 +00:00
\fB unix\- line\- discard\fR \fI ctrl\- u\fR
\fB unix\- word\- rubout\fR \fI ctrl\- w\fR
\fB untrack\- current\fR (stop tracking the current item; no-op if global tracking is enabled)
\fB up\fR \fI ctrl\- k ctrl\- p up\fR
\fB yank\fR \fI ctrl\- y\fR
2016-06-11 17:15:11 +00:00
2019-11-12 16:27:39 +00:00
.SS ACTION COMPOSITION
2017-01-21 17:32:49 +00:00
Multiple actions can be chained using \fB +\fR separator.
2019-11-12 16:27:39 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- multi \- \- bind 'ctrl\- a:select\- all+accept'\fR
\fB fzf \- \- multi \- \- bind 'ctrl\- a:select\- all' \- \- bind 'ctrl\- a:+accept'\fR
2019-11-12 16:27:39 +00:00
2020-12-04 11:34:41 +00:00
.SS ACTION ARGUMENT
2017-01-21 17:32:49 +00:00
2020-12-04 11:34:41 +00:00
An action denoted with \fB (...)\fR suffix takes an argument.
2016-06-11 17:15:11 +00:00
2020-12-04 11:34:41 +00:00
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind 'ctrl\- a:change\- prompt(NewPrompt> )'\fR
\fB fzf \- \- bind 'ctrl\- v:preview(cat {})' \- \- preview\- window hidden\fR
2016-10-03 17:17:36 +00:00
2020-12-04 11:34:41 +00:00
If the argument contains parentheses, fzf may fail to parse the expression. In
2016-10-03 17:17:36 +00:00
that case, you can use any of the following alternative notations to avoid
parse errors.
2016-06-11 17:15:11 +00:00
2024-06-24 00:32:35 +00:00
\fB action\- name[...]\fR
\fB action\- name{...}\fR
\fB action\- name<...>\fR
\fB action\- name~...~\fR
\fB action\- name!...!\fR
\fB action\- name@...@\fR
\fB action\- name#...#\fR
\fB action\- name$...$\fR
\fB action\- name%...%\fR
\fB action\- name^...^\fR
\fB action\- name&...&\fR
\fB action\- name*...*\fR
\fB action\- name;...;\fR
\fB action\- name/.../\fR
\fB action\- name|...|\fR
\fB action\- name:...\fR
2016-06-11 17:15:11 +00:00
.RS
2019-11-12 16:27:39 +00:00
The last one is the special form that frees you from parse errors as it does
not expect the closing character. The catch is that it should be the last one
in the comma-separated list of key-action pairs.
2016-06-11 17:15:11 +00:00
.RE
2020-12-04 11:34:41 +00:00
.SS COMMAND EXECUTION
With \fB execute(...)\fR action, you can execute arbitrary commands without
leaving fzf. For example, you can turn fzf into a simple file browser by
binding \fB enter\fR key to \fB less\fR command like follows.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind "enter:execute(less {})"\fR
2020-12-04 11:34:41 +00:00
2024-06-24 00:32:35 +00:00
You can use the same placeholder expressions as in \fB \- \- preview\fR .
2020-12-04 11:34:41 +00:00
2017-01-27 08:46:56 +00:00
fzf switches to the alternate screen when executing a command. However, if the
2017-01-29 16:27:12 +00:00
command is expected to complete quickly, and you are not interested in its
2024-06-24 00:32:35 +00:00
output, you might want to use \fB execute\- silent\fR instead, which silently
2017-01-29 16:27:12 +00:00
executes the command without the switching. Note that fzf will not be
2018-03-27 08:53:20 +00:00
responsive until the command is complete. For asynchronous execution, start
2017-01-29 16:27:12 +00:00
your command as a background process (i.e. appending \fB &\fR ).
2016-06-11 17:15:11 +00:00
2024-06-24 00:32:35 +00:00
On *nix systems, fzf runs the command with \fB $SHELL \- c\fR if \fB SHELL\fR is
set, otherwise with \fB sh \- c\fR , so in this case make sure that the command is
2021-02-01 11:07:42 +00:00
POSIX-compliant.
2023-02-11 11:21:10 +00:00
\fB become(...)\fR action is similar to \fB execute(...)\fR , but it replaces the
2023-02-22 15:36:04 +00:00
current fzf process with the specified command using \fB execve(2)\fR system
2023-02-11 11:21:10 +00:00
call.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind "enter:become(vim {})"\fR
2023-02-11 11:21:10 +00:00
2019-11-12 16:27:39 +00:00
.SS RELOAD INPUT
\fB reload(...)\fR action is used to dynamically update the input list
without restarting fzf. It takes the same command template with placeholder
expressions as \fB execute(...)\fR .
See \fI https://github.com/junegunn/fzf/issues/1750\fR for more info.
e.g.
2024-06-24 00:32:35 +00:00
\fB # Update the list of processes by pressing CTRL\- R
ps \- ef | fzf \- \- bind 'ctrl\- r:reload(ps \- ef)' \- \- header 'Press CTRL\- R to reload' \\
\- \- header\- lines=1 \- \- layout=reverse
2019-11-12 16:27:39 +00:00
# Integration with ripgrep
2024-06-24 00:32:35 +00:00
RG_PREFIX="rg \- \- column \- \- line\- number \- \- no\- heading \- \- color=always \- \- smart\- case "
2019-11-12 16:27:39 +00:00
INITIAL_QUERY="foobar"
FZF_DEFAULT_COMMAND="$RG_PREFIX '$INITIAL_QUERY'" \\
2024-06-24 00:32:35 +00:00
fzf \- \- bind "change:reload:$RG_PREFIX {q} || true" \\
\- \- ansi \- \- disabled \- \- query "$INITIAL_QUERY"\fR
2019-11-12 16:27:39 +00:00
2024-06-24 00:32:35 +00:00
\fB reload\- sync(...)\fR is a synchronous version of \fB reload\fR that replaces
2022-12-29 11:03:51 +00:00
the list only when the command is complete. This is useful when the command
takes a while to produce the initial output and you don't want fzf to run
against an empty list while the command is running.
e.g.
\fB # You can still filter and select entries from the initial list for 3 seconds
2024-06-24 00:32:35 +00:00
seq 100 | fzf \- \- bind 'load:reload\- sync(sleep 3; seq 1000)+unbind(load)'\fR
2022-12-29 11:03:51 +00:00
2023-12-26 03:20:27 +00:00
.SS TRANSFORM ACTIONS
2024-06-24 00:32:35 +00:00
Actions with \fB transform\- \fR prefix are used to transform the states of fzf
2023-12-26 03:20:27 +00:00
using the output of an external command. The output of these commands are
expected to be a single line of text.
e.g.
2024-06-24 00:32:35 +00:00
\fB fzf \- \- bind 'focus:transform\- header:file \- \- brief {}'\fR
2023-12-26 03:20:27 +00:00
\fB transform(...)\fR action runs an external command that should print a series
of actions to be performed. The output should be in the same format as the
2024-06-24 00:32:35 +00:00
payload of HTTP POST request to the \fB \- \- listen\fR server.
2023-12-26 03:20:27 +00:00
e.g.
\fB # Disallow selecting an empty line
2024-06-24 00:32:35 +00:00
echo \- e "1. Hello\\ n2. Goodbye\\ n\\ n3. Exit" |
fzf \- \- height '~100%' \- \- reverse \- \- header 'Select one' \\
\- \- bind 'enter:transform:[[ \- n {} ]] &&
2023-12-26 03:20:27 +00:00
echo accept ||
2024-06-24 00:32:35 +00:00
echo "change\- header:Invalid selection"'
2023-12-26 03:20:27 +00:00
\fR
2020-06-21 13:41:33 +00:00
.SS PREVIEW BINDING
With \fB preview(...)\fR action, you can specify multiple different preview
2024-06-24 00:32:35 +00:00
commands in addition to the default preview command given by \fB \- \- preview\fR
2020-06-21 13:41:33 +00:00
option.
e.g.
# Default preview command with an extra preview binding
2024-06-24 00:32:35 +00:00
fzf \- \- preview 'file {}' \- \- bind '?:preview:cat {}'
2020-06-21 13:41:33 +00:00
# A preview binding with no default preview command
# (Preview window is initially empty)
2024-06-24 00:32:35 +00:00
fzf \- \- bind '?:preview:cat {}'
2020-06-21 13:41:33 +00:00
# Preview window hidden by default, it appears when you first hit '?'
2024-06-24 00:32:35 +00:00
fzf \- \- bind '?:preview:cat {}' \- \- preview\- window hidden
2020-06-21 13:41:33 +00:00
2021-12-04 02:46:15 +00:00
.SS CHANGE PREVIEW WINDOW ATTRIBUTES
2024-06-24 00:32:35 +00:00
\fB change\- preview\- window\fR action can be used to change the properties of the
preview window. Unlike the \fB \- \- preview\- window\fR option, you can specify
2021-12-04 02:46:15 +00:00
multiple sets of options separated by '|' characters.
e.g.
2024-06-24 00:32:35 +00:00
# Rotate through the options using CTRL\- /
fzf \- \- preview 'cat {}' \- \- bind 'ctrl\- /:change\- preview\- window(right,70%|down,40%,border\- horizontal|hidden|right)'
2021-12-04 02:46:15 +00:00
2024-06-24 00:32:35 +00:00
# The default properties given by `\- \- preview\- window` are inherited, so an empty string in the list is interpreted as the default
fzf \- \- preview 'cat {}' \- \- preview\- window 'right,40%,border\- left' \- \- bind 'ctrl\- /:change\- preview\- window(70%|down,border\- top|hidden|)'
2021-12-04 02:46:15 +00:00
2024-06-24 00:32:35 +00:00
# This is equivalent to toggle\- preview action
fzf \- \- preview 'cat {}' \- \- bind 'ctrl\- /:change\- preview\- window(hidden|)'
2021-12-04 02:46:15 +00:00
2015-03-25 18:06:31 +00:00
.SH AUTHOR
2015-03-26 01:31:11 +00:00
Junegunn Choi (\fI junegunn.c@gmail.com\fR )
2015-03-25 18:06:31 +00:00
.SH SEE ALSO
2015-09-12 04:31:07 +00:00
.B Project homepage:
.RS
2015-03-26 01:31:11 +00:00
.I https://github.com/junegunn/fzf
2015-09-12 04:31:07 +00:00
.RE
.br
2016-02-11 22:46:10 +00:00
2015-09-12 04:31:07 +00:00
.br
.B Extra Vim plugin:
.RS
.I https://github.com/junegunn/fzf.vim
.RE
2015-03-25 18:06:31 +00:00
.SH LICENSE
MIT