0.53.0 #
(June 2024)
0.53.0 is a huge release with major improvements and changes. Bugs are expected, so please report them if you find any.
Multi-line display #
Finally, fzf can now display multi-line items properly. And CTRL-R bindings (command history) for all three shells have been updated to leverage this and display multi-line commands in their original form.
And here are some other examples.
All bash/zsh functions, highlighted #
This uses bat to syntax-highlight the functions.
declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
bat --plain --language bash --color always |
fzf --read0 --ansi --reverse --multi --highlight-line
Ripgrep multi-line output #
This isn’t particularly useful, but it demonstrates how fzf can handle multi-line entries.
rg --pretty bash | perl -0777 -pe 's/\n\n/\n\0/gm' |
fzf --read0 --ansi --exact --multi --highlight-line --reverse --tmux 70%
I used --exact
option here, because in this case, fuzzy matching yields too
many irrelevant matches.
Multi-line display in fzf.vim #
See https://github.com/junegunn/fzf.vim/pull/1549
See Processing multi-line items for more information.
Native tmux integration #
fzf has been shipped with fzf-tmux script which allows you to open fzf in
a tmux pane or popup. But to simplify the distribution, 0.53.0 adds --tmux
option, which implements the same functionality natively.
# --tmux [center|top|bottom|left|right][,SIZE[%]][,SIZE[%]]
# Center, 100% width and 70% height
fzf --tmux 100%,70% --border horizontal --padding 1,2
# Left, 30% width
fzf --tmux left,30%
# Bottom, 50% height
fzf --tmux bottom,50%
You can add it to your $FZF_DEFAULT_OPTS
so that it’s globally applied.
export FZF_DEFAULT_OPTS='--tmux 100%,70% --border horizontal --padding 1,2'
But to use it on Vim, you also have set specify the option in g:fzf_layout
.
let g:fzf_layout = { 'tmux': '100%,70%' }
--tail=NUM
for browsing stream data
#
Added --tail=NUM
option to limit the 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.
# Interactive filtering of a log stream
tail -f *.log | fzf --tail 100000 --tac --no-sort --exact
See Browsing log stream with fzf for more information.
Default changes #
0.53.0 introduces a few changes to the default options.
- The default
--pointer
and--marker
have been changed from>
to Unicode bar characters as they look nice both with single-line and multi-line items - Changed the default
--scroll-off
to 3 from 0, as we think it’s a better default
Better Windows support #
Many Windows-specific issues have been fixed in this release. fzf and its shell integration now run out of the box on Git bash.
eval "$(fzf --bash)"
Embedded man page #
This is yet another attempt to simplify the distribution (no need to carry
around auxiliary files, all you need is a single fzf binary). The man page
is now included in the binary and you can view it with fzf --man
.
Better ergonomics #
- Process started by
execute
action now directly writes to and reads from/dev/tty
. Manual/dev/tty
redirection for interactive programs is no longer required.# Vim will work just fine without /dev/tty redirection ls | fzf --bind 'space:execute:vim {}' > selected
NO_COLOR
environment variable is now respected. If the variable is set, fzf defaults to--no-color
unless otherwise specified.