Skip to content

Releases: junegunn/fzf

0.62.0

04 May 10:00
v0.62.0
d226d84
Compare
Choose a tag to compare
  • Relaxed the --color option syntax to allow whitespace-separated entries (in addition to commas), making multi-line definitions easier to write and read
    # seoul256-light
    fzf --style full --color='
      fg:#616161 fg+:#616161
      bg:#ffffff bg+:#e9e9e9 alt-bg:#f1f1f1
      hl:#719872 hl+:#719899
      pointer:#e12672 marker:#e17899
      header:#719872
      spinner:#719899 info:#727100
      prompt:#0099bd query:#616161
      border:#e1e1e1
    '
  • Added alt-bg color to create striped lines to visually separate rows
    fzf --color bg:237,alt-bg:238,current-bg:236 --highlight-line
    
    declare -f | perl -0777 -pe 's/^}\n/}\0/gm' |
      bat --plain --language bash --color always |
      fzf --read0 --ansi --reverse --multi \
          --color bg:237,alt-bg:238,current-bg:236 --highlight-line
  • [fish] Improvements in CTRL-R binding (@bitraid)
    • You can trigger CTRL-R in the middle of a command to insert the selected item
    • You can delete history items with SHIFT-DEL
  • Bug fixes and improvements
    • Fixed unnecessary 100ms delay after reload (#4364)
    • Fixed selected-bg not applied to colored items (#4372)

Screenshot

image

0.61.3

22 Apr 12:55
v0.61.3
d24b58e
Compare
Choose a tag to compare
  • Reverted #4351 as it caused tmux run-shell 'fzf --tmux' to fail (#4559 #4560)
  • More environment variables for child processes (#4356)

0.61.2

20 Apr 02:42
v0.61.2
90ad1b7
Compare
Choose a tag to compare
  • Fixed panic when using header border without pointer/marker (@phanen)
  • Fixed --tmux option when already inside a tmux popup (@peikk0)
  • Bug fixes and improvements in CTRL-T binding of fish (#4334) (@bitraid)
  • Added --no-tty-default option to make fzf search for the current TTY device instead of defaulting to /dev/tty (#4242)

0.61.1

06 Apr 04:15
v0.61.1
93cb375
Compare
Choose a tag to compare
  • Disable bracketed-paste mode on exit. This fixes issue where pasting breaks after running fzf on old bash versions that don't support the mode.

0.61.0

30 Mar 10:57
v0.61.0
e15cba0
Compare
Choose a tag to compare
  • Added --ghost=TEXT to display a ghost text when the input is empty
    # Display "Type to search" when the input is empty
    fzf --ghost "Type to search"
  • Added change-ghost and transform-ghost actions for dynamically changing the ghost text
  • Added change-pointer and transform-pointer actions for dynamically changing the pointer sign
  • Added r flag for placeholder expression (raw mode) for unquoted output
  • Bug fixes and improvements

0.60.3

03 Mar 08:18
v0.60.3
0012183
Compare
Choose a tag to compare
  • Bug fixes and improvements
    • [fish] Enable multiple history commands insertion (#4280) (@bitraid)
    • [walker] Append '/' to directory entries on MSYS2 (#4281)
    • Trim trailing whitespaces after processing ANSI sequences (#4282)
    • Remove temp files before become when using --tmux option (#4283)
    • Fix condition for using item numlines cache (#4285) (@alex-huff)
    • Make --accept-nth compatible with --select-1 (#4287)
    • Increase the query length limit from 300 to 1000 (#4292)
    • [windows] Prevent fzf from consuming user input while paused (#4260)

0.60.2

23 Feb 11:25
v0.60.2
c0d407f
Compare
Choose a tag to compare
  • Template for --with-nth and --accept-nth now supports {n} which evaluates to the zero-based ordinal index of the item
  • Fixed a regression that caused the last field in the "nth" expression to be trimmed when a regular expression delimiter is used
  • Fixed 'jump' action when the pointer is an empty string

0.60.1

20 Feb 12:46
v0.60.1
a24d274
Compare
Choose a tag to compare
  • Bug fixes and minor improvements
    • Built-in walker now prints directory entries with a trailing slash
    • Fixed a bug causing unexpected behavior with fzf-tab. Please upgrade if you use it.
  • Thanks to @alexeisersun, @bitraid, @Lompik, and @fsc0 for the contributions

0.60.0

12 Feb 16:02
v0.60.0
3347d61
Compare
Choose a tag to compare

Release highlights: https://junegunn.github.io/fzf/releases/0.60.0/

  • Added --accept-nth for choosing output fields
    ps -ef | fzf --multi --header-lines 1 | awk '{print $2}'
    # Becomes
    ps -ef | fzf --multi --header-lines 1 --accept-nth 2
    
    git branch | fzf | cut -c3-
    # Can be rewritten as
    git branch | fzf --accept-nth -1
  • --accept-nth and --with-nth now support a template that includes multiple field index expressions in curly braces
    echo foo,bar,baz | fzf --delimiter , --accept-nth '{1}, {3}, {2}'
      # foo, baz, bar
    
    echo foo,bar,baz | fzf --delimiter , --with-nth '{1},{3},{2},{1..2}'
      # foo,baz,bar,foo,bar
  • Added exclude and exclude-multi actions for dynamically excluding items
    seq 100 | fzf --bind 'ctrl-x:exclude'
    
    # 'exclude-multi' will exclude the selected items or the current item
    seq 100 | fzf --multi --bind 'ctrl-x:exclude-multi'
  • Preview window now prints wrap indicator when wrapping is enabled
    seq 100 | xargs | fzf --wrap --preview 'echo {}' --preview-window wrap
  • Bug fixes and improvements

0.59.0

02 Feb 14:44
v0.59.0
bbe1721
Compare
Choose a tag to compare

Release highlights: https://junegunn.github.io/fzf/releases/0.59.0/

  • Prioritizing file name matches (#4192)
    • Added a new tiebreak option pathname for prioritizing file name matches
    • --scheme=path now sets --tiebreak=pathname,length
    • fzf will automatically choose path scheme
      • when the input is a TTY device, where fzf would start its built-in walker or run $FZF_DEFAULT_COMMAND which is usually a command for listing files,
      • but not when reload or transform action is bound to start event, because in that case, fzf can't be sure of the input type.
  • Added --header-lines-border to display header from --header-lines with a separate border
    # Use --header-lines-border to separate two headers
    ps -ef | fzf --style full --layout reverse --header-lines 1 \
                 --bind 'ctrl-r:reload(ps -ef)' --header 'Press CTRL-R to reload' \
                 --header-lines-border bottom --no-list-border
  • click-header event now sets $FZF_CLICK_HEADER_WORD and $FZF_CLICK_HEADER_NTH. You can use them to implement a clickable header for changing the search scope using the new transform-nth action.
    # Click on the header line to limit search scope
    ps -ef | fzf --style full --layout reverse --header-lines 1 \
                 --header-lines-border bottom --no-list-border \
                 --color fg:dim,nth:regular \
                 --bind 'click-header:transform-nth(
                           echo $FZF_CLICK_HEADER_NTH
                         )+transform-prompt(
                           echo "$FZF_CLICK_HEADER_WORD> "
                         )'
    • $FZF_KEY was updated to expose the type of the click. e.g. click, ctrl-click, etc. You can use it to implement a more sophisticated behavior.
    • kill completion for bash and zsh were updated to use this feature
  • Added --no-input option to completely disable and hide the input section
    # Click header to trigger search
    fzf --header '[src] [test]' --no-input --layout reverse \
        --header-border bottom --input-border \
        --bind 'click-header:transform-search:echo ${FZF_CLICK_HEADER_WORD:1:-1}'
    
    # Vim-like mode switch
    fzf --layout reverse-list --no-input \
        --bind 'j:down,k:up,/:show-input+unbind(j,k,/)' \
        --bind 'enter,esc,ctrl-c:transform:
          if [[ $FZF_INPUT_STATE = enabled ]]; then
            echo "rebind(j,k,/)+hide-input"
          elif [[ $FZF_KEY = enter ]]; then
            echo accept
          else
            echo abort
          fi
        '
    • You can later show the input section using show-input or toggle-input action, and hide it again using hide-input, or toggle-input.
  • Extended {q} placeholder to support ranges. e.g. {q:1}, {q:2..}, etc.
  • Added search(...) and transform-search(...) action to trigger an fzf search with an arbitrary query string. This can be used to extend the search syntax of fzf. In the following example, fzf will use the first word of the query to trigger ripgrep search, and use the rest of the query to perform fzf search within the result.
    export TEMP=$(mktemp -u)
    trap 'rm -f "$TEMP"' EXIT
    
    TRANSFORMER='
      rg_pat={q:1}      # The first word is passed to ripgrep
      fzf_pat={q:2..}   # The rest are passed to fzf
    
      if ! [[ -r "$TEMP" ]] || [[ $rg_pat != $(cat "$TEMP") ]]; then
        echo "$rg_pat" > "$TEMP"
        printf "reload:sleep 0.1; rg --column --line-number --no-heading --color=always --smart-case %q || true" "$rg_pat"
      fi
      echo "+search:$fzf_pat"
    '
    fzf --ansi --disabled \
      --with-shell 'bash -c' \
      --bind "start,change:transform:$TRANSFORMER"
  • You can now bind actions to multiple keys and events at once by writing a comma-separated list of keys and events before the colon
    # Load 'ps -ef' output on start and reload it on CTRL-R
    fzf --bind 'start,ctrl-r:reload:ps -ef'
  • --min-height option now takes a number followed by +, which tells fzf to show at least that many items in the list section. The default value is now changed to 10+.
    # You will only see the input section which takes 3 lines
    fzf --style=full --height 1% --min-height 3
    
    # You will see 3 items in the list section
    fzf --style full --height 1% --min-height 3+
    • Shell integration scripts were updated to use --min-height 20+ by default
  • --header-lines will be displayed at the top in reverse-list layout
  • Added bell action to ring the terminal bell
    # Press CTRL-Y to copy the current line to the clipboard and ring the bell
    fzf --bind 'ctrl-y:execute-silent(echo -n {} | pbcopy)+bell'
  • Added toggle-bind action
  • Bug fixes and improvements
  • Fixed fish script to support fish 3.1.2 or later (@bitraid)