Releases: junegunn/fzf
Releases · junegunn/fzf
0.54.0
Release highlights: https://junegunn.github.io/fzf/releases/0.54.0/
- Implemented line wrap of long items
--wrap
option enables line wrap--wrap-sign
customizes the sign for wrapped lines (default:↳
)toggle-wrap
action toggles line wraphistory | fzf --tac --wrap --bind 'ctrl-/:toggle-wrap' --wrap-sign $'\t↳ '
- fzf by default binds
CTRL-/
andALT-/
totoggle-wrap
- Updated shell integration scripts to leverage line wrap
- CTRL-R binding includes
--wrap-sign $'\t↳ '
to indent wrapped lines kill **
completion uses--wrap
to show the whole line by default instead of showing it in the preview window
- CTRL-R binding includes
- Added
--info-command
option for customizing the info line# Prepend the current cursor position in yellow fzf --info-command='echo -e "\x1b[33;1m$FZF_POS\x1b[m/$FZF_INFO 💛"'
$FZF_INFO
is set to the original info text- ANSI color codes are supported
- Pointer and marker signs can be set to empty strings
# Minimal style fzf --pointer '' --marker '' --prompt '' --info hidden
- Better cache management and improved rendering for
--tail
- Improved
--sync
behavior- When
--sync
is provided, fzf will not render the interface until the initial filtering and the associated actions (bound to any ofstart
,load
,result
, orfocus
) are complete.# fzf will not render intermediate states (sleep 1; seq 1000000; sleep 1) | fzf --sync --query 5 --listen --bind start:up,load:up,result:up,focus:change-header:Ready
- When
- GET endpoint is now available from
execute
andtransform
actions (it used to timeout due to lock conflict)fzf --listen --sync --bind 'focus:transform-header:curl -s localhost:$FZF_PORT?limit=0 | jq .'
- Added
offset-middle
action to place the current item is in the middle of the screen - fzf will not start the initial reader when
reload
orreload-sync
is bound tostart
event.fzf < /dev/null
or: | fzf
are no longer required and extraneousload
event will not fire due to the empty list.# Now this will work as expected. Previously, this would print an invalid header line. # `fzf < /dev/null` or `: | fzf` would fix the problem, but then an extraneous # `load` event would fire and the header would be prematurely updated. fzf --header 'Loading ...' --header-lines 1 \ --bind 'start:reload:sleep 1; ps -ef' \ --bind 'load:change-header:Loaded!'
- Fixed mouse support on Windows
- Fixed crash when using
--tiebreak=end
with very long items - zsh 5.0 compatibility (thanks to @LangLangBart)
- Fixed
--walker-skip
to also skip symlinks to directories - Fixed
result
event not fired when input stream is not complete - Built-in reader of the Windows binary will print forward slashes on MSYS and WSL (thanks to @charlievieth)
- New tags will have
v
prefix so that they are available on https://proxy.golang.org/
0.53.0
Release highlights: https://junegunn.github.io/fzf/releases/0.53.0/
- Multi-line display
- See Processing multi-line items
- fzf can now display multi-line items
# All bash functions, highlighted 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 rg --pretty bash | perl -0777 -pe 's/\n\n/\n\0/gm' | fzf --read0 --ansi --multi --highlight-line --reverse --tmux 70%
- To disable multi-line display, use
--no-multi-line
- To disable multi-line display, use
- CTRL-R bindings of bash, zsh, and fish have been updated to leverage multi-line display
- The default
--pointer
and--marker
have been changed from>
to Unicode bar characters as they look better with multi-line items - Added
--marker-multi-line
to customize the select marker for multi-line entries with the default set to╻┃╹
╻First line ┃... ╹Last line
- Native tmux integration
- Added
--tmux
option to replace fzf-tmux script and simplify distribution# --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%
- To keep the implementation simple, it only uses popups. You need tmux 3.3 or later.
- To use
--tmux
in Vim plugin:let g:fzf_layout = { 'tmux': '100%,70%' }
- Added
- Added support for endless input streams
- See Browsing log stream with fzf
- 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
- Better Windows Support
- fzf now works on Git bash (mintty) out of the box via winpty integration
- Many fixes and improvements for Windows
- man page is now embedded in the binary;
fzf --man
to see it - Changed the default
--scroll-off
to 3, as we think it's a better default - 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 fine without /dev/tty redirection ls | fzf --bind 'space:execute:vim {}' > selected
- Added
print(...)
action to queue an arbitrary string to be printed on exit. This was mainly added to work around the limitation of--expect
where it's not compatible with--bind
on the same key and it would ignore other actions bound to it.# This doesn't work as expected because --expect is not compatible with --bind fzf --multi --expect ctrl-y --bind 'ctrl-y:select-all' # This is something you can do instead fzf --multi --bind 'enter:print()+accept,ctrl-y:select-all+print(ctrl-y)+accept'
- We also considered making them compatible, but realized that some users may have been relying on the current behavior.
NO_COLOR
environment variable is now respected. If the variable is set, fzf defaults to--no-color
unless otherwise specified.
0.52.1
0.52.0
- Added
--highlight-line
to highlight the whole current line (à laset cursorline
of Vim) - Added color names for selected lines:
selected-fg
,selected-bg
, andselected-hl
fzf --border --multi --info inline-right --layout reverse --marker ▏ --pointer ▌ --prompt '▌ ' \ --highlight-line --color gutter:-1,selected-bg:238,selected-fg:146,current-fg:189
- Added
click-header
event that is triggered when the header section is clicked. When the event is triggered,$FZF_CLICK_HEADER_COLUMN
and$FZF_CLICK_HEADER_LINE
are set.fd --type f | fzf --header $'[Files] [Directories]' --header-first \ --bind 'click-header:transform: (( FZF_CLICK_HEADER_COLUMN <= 7 )) && echo "reload(fd --type f)" (( FZF_CLICK_HEADER_COLUMN >= 9 )) && echo "reload(fd --type d)" '
- Added
$FZF_COMPLETION_{DIR,PATH}_OPTS
for separately customizing the behavior of directory and path completion# Set --walker options without 'follow' not to follow symbolic links FZF_COMPLETION_PATH_OPTS="--walker=file,dir,hidden" FZF_COMPLETION_DIR_OPTS="--walker=dir,hidden"
- Fixed Windows argument escaping
- Bug fixes and improvements
- The code was heavily refactored to allow using fzf as a library in Go programs. The API is still experimental and subject to change.
0.51.0
- Added a new environment variable
$FZF_POS
exported to the child processes. It's the vertical position of the cursor in the list starting from 1.# Toggle selection to the top or to the bottom seq 30 | fzf --multi --bind 'load:pos(10)' \ --bind 'shift-up:transform:for _ in $(seq $FZF_POS $FZF_MATCH_COUNT); do echo -n +toggle+up; done' \ --bind 'shift-down:transform:for _ in $(seq 1 $FZF_POS); do echo -n +toggle+down; done'
- Added
--with-shell
option to start child processes with a custom shell command and flagsgem list | fzf --with-shell 'ruby -e' \ --preview 'pp Gem::Specification.find_by_name({1})' \ --bind 'ctrl-o:execute-silent: spec = Gem::Specification.find_by_name({1}) [spec.homepage, *spec.metadata.filter { _1.end_with?("uri") }.values].uniq.each do system "open", _1 end '
- Added
change-multi
action for dynamically changing--multi
optionchange-multi
- enable multi-select mode with no limitchange-multi(NUM)
- enable multi-select mode with a limitchange-multi(0)
- disable multi-select mode
- Windows improvements
become
action is now supported on Windows- Unlike in *nix, this does not use
execve(2)
. Instead it spawns a new process and waits for it to finish, so the exact behavior may differ.
- Unlike in *nix, this does not use
- Fixed argument escaping for Windows cmd.exe. No redundant escaping of backslashes.
- Bug fixes and improvements
0.50.0
- Search performance optimization. You can observe 50%+ improvement in some scenarios.
$ rg --line-number --no-heading --smart-case . > $DATA $ wc < $DATA 5520118 26862362 897487793 $ hyperfine -w 1 -L bin fzf-0.49.0,fzf-7ce6452,fzf-a5447b8,fzf '{bin} --filter "///" < $DATA | head -30' Summary fzf --filter "///" < $DATA | head -30 ran 1.16 ± 0.03 times faster than fzf-a5447b8 --filter "///" < $DATA | head -30 1.23 ± 0.03 times faster than fzf-7ce6452 --filter "///" < $DATA | head -30 1.52 ± 0.03 times faster than fzf-0.49.0 --filter "///" < $DATA | head -30
- Added
jump
andjump-cancel
events that are triggered when leavingjump
mode# Default behavior fzf --bind space:jump # Same as jump-accept action fzf --bind space:jump,jump:accept # Accept on jump, abort on cancel fzf --bind space:jump,jump:accept,jump-cancel:abort # Change header on jump-cancel fzf --bind 'space:change-header(Type jump label)+jump,jump-cancel:change-header:Jump cancelled'
- Added a new environment variable
$FZF_KEY
exported to the child processes. It's the name of the last key pressed.fzf --bind 'space:jump,jump:accept,jump-cancel:transform:[[ $FZF_KEY =~ ctrl-c ]] && echo abort'
- fzf can be built with profiling options. See BUILD.md for more information.
- Bug fixes
0.49.0
- Ingestion performance improved by around 40% (more or less depending on options)
$ time wc data 5513620 37997130 547840920 data real 0m0.822s user 0m0.764s sys 0m0.052s $ hyperfine -L bin fzf-0.48.1,fzf '{bin} --sync --bind load:accept < data' Benchmark 1: fzf-0.48.1 --sync --bind load:accept < data Time (mean ± σ): 440.3 ms ± 4.9 ms [User: 501.8 ms, System: 117.0 ms] Range (min … max): 432.8 ms … 446.1 ms 10 runs Benchmark 2: fzf --sync --bind load:accept < data Time (mean ± σ): 303.3 ms ± 4.5 ms [User: 320.1 ms, System: 108.6 ms] Range (min … max): 296.6 ms … 311.4 ms 10 runs Summary fzf --sync --bind load:accept < data ran 1.45 ± 0.03 times faster than fzf-0.48.1 --sync --bind load:accept < data
--info=hidden
and--info=inline-right
will no longer hide the horizontal separator by default. This gives you more flexibility in customizing the layout.fzf --border --info=inline-right fzf --border --info=inline-right --separator ═ fzf --border --info=inline-right --no-separator fzf --border --info=hidden fzf --border --info=hidden --separator ━ fzf --border --info=hidden --no-separator
- Added two environment variables exported to the child processes
FZF_PREVIEW_LABEL
FZF_BORDER_LABEL
# Use the current value of $FZF_PREVIEW_LABEL to determine which actions to perform git ls-files | fzf --header 'Press CTRL-P to change preview mode' \ --bind='ctrl-p:transform:[[ $FZF_PREVIEW_LABEL =~ cat ]] \ && echo "change-preview(git log --color=always \{})+change-preview-label([[ log ]])" \ || echo "change-preview(bat --color=always \{})+change-preview-label([[ cat ]])"'
- Renamed
track
action totrack-current
to highlight the difference between the global tracking state set by--track
and a one-off tracking actiontrack
is still available as an alias
- Added
untrack-current
andtoggle-track-current
actions*-current
actions are no-op when the global tracking state is set
- Bug fixes and minor improvements
0.48.1
- CTRL-T and ALT-C bindings can be disabled by setting
FZF_CTRL_T_COMMAND
andFZF_ALT_C_COMMAND
to empty strings respectively when sourcing the script# bash FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= eval "$(fzf --bash)" # zsh FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= eval "$(fzf --zsh)" # fish fzf --fish | FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= source
- Setting the variables after sourcing the script will have no effect
- Bug fixes
0.48.0
- Shell integration scripts are now embedded in the fzf binary. This simplifies the distribution, and the users are less likely to have problems caused by using incompatible scripts and binaries.
- bash
# Set up fzf key bindings and fuzzy completion eval "$(fzf --bash)"
- zsh
# Set up fzf key bindings and fuzzy completion eval "$(fzf --zsh)"
- fish
# Set up fzf key bindings fzf --fish | source
- bash
- Added options for customizing the behavior of the built-in walker
Option Description Default --walker=OPTS
Walker options ( [file][,dir][,follow][,hidden]
)file,follow,hidden
--walker-root=DIR
Root directory from which to start walker .
--walker-skip=DIRS
Comma-separated list of directory names to skip .git,node_modules
- Examples
# Built-in walker is only used by standalone fzf when $FZF_DEFAULT_COMMAND is not set unset FZF_DEFAULT_COMMAND fzf # default: --walker=file,follow,hidden --walker-root=. --walker-skip=.git,node_modules fzf --walker=file,dir,hidden,follow --walker-skip=.git,node_modules,target # Walker options in $FZF_DEFAULT_OPTS export FZF_DEFAULT_OPTS="--walker=file,dir,hidden,follow --walker-skip=.git,node_modules,target" fzf # Reading from STDIN; --walker is ignored seq 100 | fzf --walker=dir # Reading from $FZF_DEFAULT_COMMAND; --walker is ignored export FZF_DEFAULT_COMMAND='seq 100' fzf --walker=dir
- Examples
- Shell integration scripts have been updated to use the built-in walker with these new options and they are now much faster out of the box.
0.47.0
- Replaced "the default find command" with a built-in directory walker to simplify the code and to achieve better performance and consistent behavior across platforms. This doesn't affect you if you have
$FZF_DEFAULT_COMMAND
set.- Breaking changes:
- Unlike the previous "find" command, the new traversal code will list hidden files, but hidden directories will still be ignored
- No filtering of
devtmpfs
orproc
types - Traversal is parallelized, so the order of the entries will be different each time
- You may wonder why fzf implements directory walker anyway when it's a filter program following the Unix philosophy. But fzf has had the walker code for years to tackle the performance problem on Windows. And I decided to use the same approach on different platforms as well for the benefits listed above.
- Built-in walker is using the excellent charlievieth/fastwalk library, which easily outperforms its competitors and supports safely following symlinks.
- Breaking changes:
- Added
$FZF_DEFAULT_OPTS_FILE
to allow managing default options in a file- See #3618
- Option precedence from lower to higher
- Options read from
$FZF_DEFAULT_OPTS_FILE
- Options from
$FZF_DEFAULT_OPTS
- Options from command-line arguments
- Options read from
- Bug fixes and improvements