Skip to content

0.43.0

Compare
Choose a tag to compare
@junegunn junegunn released this 14 Oct 17:06
· 517 commits to master since this release
0.43.0
d3311d9
  • (Experimental) Added support for Kitty image protocol in the preview window (currently not supported on Windows)

    fzf --preview='
      if file --mime-type {} | grep -qF image/; then
        # --transfer-mode=memory is the fastest option but if you want fzf to be able
        # to redraw the image on terminal resize or on "change-preview-window",
        # you need to use --transfer-mode=stream.
        kitty icat --clear --transfer-mode=memory --stdin=no --place=${FZF_PREVIEW_COLUMNS}x${FZF_PREVIEW_LINES}@0x0 {} | sed \$d
      else
        bat --color=always {}
      fi
    '
    image
  • (Experimental) --listen server can report program state in JSON format (GET /)

    # fzf server started in "headless" mode
    fzf --listen 6266 2> /dev/null
    
    # Get program state
    curl localhost:6266 | jq .
    
    # Increase the number of items returned (default: 100)
    curl localhost:6266?limit=1000 | jq .
  • --listen server can be secured by setting $FZF_API_KEY environment
    variable.

    export FZF_API_KEY="$(head -c 32 /dev/urandom | base64)"
    
    # Server
    fzf --listen 6266
    
    # Client
    curl localhost:6266 -H "x-api-key: $FZF_API_KEY" -d 'change-query(yo)'
  • Added toggle-header action

  • Added mouse events for --bind

    • scroll-up (bound to up)
    • scroll-down (bound to down)
    • shift-scroll-up (bound to toggle+up)
    • shift-scroll-down (bound to toggle+down)
    • shift-left-click (bound to toggle)
    • shift-right-click (bound to toggle)
    • preview-scroll-up (bound to preview-up)
    • preview-scroll-down (bound to preview-down)
    # Twice faster scrolling both in the main window and the preview window
    fzf --bind 'scroll-up:up+up,scroll-down:down+down' \
        --bind 'preview-scroll-up:preview-up+preview-up' \
        --bind 'preview-scroll-down:preview-down+preview-down' \
        --preview 'cat {}'
  • Added offset-up and offset-down actions

    # Scrolling will behave similarly to CTRL-E and CTRL-Y of vim
    fzf --bind scroll-up:offset-up,scroll-down:offset-down \
        --bind ctrl-y:offset-up,ctrl-e:offset-down \
        --scroll-off=5
  • Shell extensions

    • Updated bash completion for fzf options
    • bash key bindings no longer requires perl; it will use awk or mawk
      instead if perl is not found
    • Basic context-aware completion for ssh command
    • Applied --scheme=path for better ordering of the result
  • Bug fixes and improvements