Commit Graph

299 Commits (d282a1649d7d953f028306f13d6616958f3fd1f3)

Author SHA1 Message Date
Junegunn Choi d282a1649d
Add walker options and replace 'find' with the built-in walker (#3649) 2 months ago
Junegunn Choi 0494f20d62
Revert "Fix CHANGELOG"
This reverts commit 73aff476dd.
2 months ago
Junegunn Choi 73aff476dd
Fix CHANGELOG 2 months ago
Junegunn Choi 98ee5e651a
0.47.0 2 months ago
Junegunn Choi 1833670fb9
Add $FZF_DEFAULT_OPTS_FILE (#3618)
For those who prefer to manage default options in a file.
If the file is not found, fzf will exit with an error.

We're not setting a default value for it because:

1. it's hard to find a default value that can be universally agreed upon
2. to avoid fzf having to check for the existence of the file even when it's not used
3 months ago
Junegunn Choi 17da165cfe
CHANGELOG: charlievieth/fastwalk 3 months ago
Junegunn Choi 208e556332
Replace "default find command" with built-in directory traversal 3 months ago
Junegunn Choi 2a1e5a9729
More test fixes for tcell on GitHub Actions 4 months ago
Junegunn Choi 76cf6559cc
junegunn/uniseg -> rivo/uniseg
https://github.com/rivo/uniseg/pull/47
4 months ago
Junegunn Choi beb2de2dd9
0.46.0 4 months ago
Junegunn Choi 687c2741b8
Add 'resize' event
Close #3570
4 months ago
Junegunn Choi 16f6473938
Change mattn/go-runewidth dependency to rivo/uniseg for accurate results
Related #3588 #3588 #3567
4 months ago
Junegunn Choi e7718b92b7
Kitty image support improvements
* Use `--unicode-placeholder` for consistent result in and out of tmux
* Use updated version of junegunn/go-runewidth that handles diacritics
  used in Kitty Unicode placeholder

Close #3567
4 months ago
Junegunn Choi cdfaf761df
Expose state information via environment variables to child processes
Close #3582
4 months ago
Junegunn Choi 250496c953
Add 'result' event that is triggered when the result list is ready
Close #3560
4 months ago
Junegunn Choi 2024010119
0.45.0 5 months ago
Junegunn Choi d210660ce8
Add actions: show-header and hide-header 5 months ago
Junegunn Choi 5d360180af
Add {fzf:prompt} placeholder expression
Close #3354
5 months ago
Junegunn Choi c4df0dd06e
Add TRANSFORM ACTIONS section to man page 5 months ago
Junegunn Choi 1707b8cdba
Add 'transform' action to conditionally perform a series of actions
'transform' action runs an external command that prints a series of
actions to perform.

  # Disallow selecting an empty line
  echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
    fzf --reverse --header 'Select one' \
        --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"'

  # Move cursor past the empty line
  echo -e "1. Hello\n2. Goodbye\n\n3. Exit" |
    fzf --reverse --header 'Select one' \
        --bind 'enter:transform:[[ -n {} ]] && echo accept || echo "change-header:Invalid selection"' \
        --bind 'focus:transform:[[ -n {} ]] && exit; [[ {fzf:action} =~ up$ ]] && echo up || echo down'

Close #3368
Close #2980
5 months ago
Junegunn Choi d7b61ede07
Add support for negative --height
fzf --height=-1

Close #3487
5 months ago
Junegunn Choi e8b34cb00d
Clarification on accept-or-print-query vs. become 5 months ago
Junegunn Choi c36a64be68
Add accept-or-print-query
Close #3528
5 months ago
Junegunn Choi d7d2ac3951
0.44.1 6 months ago
Junegunn Choi 38e3694d1c
Revert "Sixel and Kitty image support on Windows binary (#2544)"
This reverts commit 68db9cb499.
6 months ago
Junegunn Choi 230fc49ae2
(Experimental) Add support for iTerm2 inline image protocol
Close #1102

  fzf --preview 'imgcat -W $FZF_PREVIEW_COLUMNS -H $FZF_PREVIEW_LINES {}'

Notes:
* There is no good way to determine the height of the rendered image,
  so we assume that the image takes the full height of the preview
  window. So the image cannot be displayed with the other text.
* fzf-preview.sh script was updated to use `imgcat` if it's available
  but `chafa` is not.
* iTerm2 also supports Sixel, so adding support for this protocol is not
  quite necessary but it renders animated GIFs much better (e.g. looping).
7 months ago
Junegunn Choi 250d507bdf
Fix a typo on CHANGELOG 7 months ago
Junegunn Choi a818653174
Add --listen-unsafe=ADDR to allow remote process execution (#3498) 7 months ago
Junegunn Choi 3f78d76da1
Allow accepting remote connections
Close #3498

  # FZF_API_KEY is required for a non-localhost listen address
  FZF_API_KEY=xxx fzf --listen 0.0.0.0:6266
7 months ago
Junegunn Choi 68db9cb499
Sixel and Kitty image support on Windows binary (#2544) 7 months ago
Junegunn Choi 3277e8c89c
Remove $FZF_PREVIEW_PIXEL_{WIDTH,HEIGHT} (#2544)
They are not neccessary because we can use a program such as chafa that
can resize images by the terminal columns and lines.
7 months ago
Junegunn Choi d02b9442a5
(Experimental) Improve Sixel graphics support (#2544)
Progress:

* Sixel image can now be displayed with other text, and is scrollable
* If an image can't be displayed entirely due to the scroll offset, fzf
  will render a wireframe to indicate that an image should be displayed
* Renamed $FZF_PREVIEW_{WIDTH,HEIGHT} to $FZF_PREVIEW_PIXEL_{WIDTH,HEIGHT}
  for clarity
* Added bin/fzf-preview.sh script to demonstrate how to display an image
  using Kitty or Sixel protocol

An example:

  ls *.jpg | fzf --preview='seq $((FZF_PREVIEW_LINES*9/10)); fzf-preview.sh {}; seq 100'

A known issue:

* If you reduce the size of the preview window, the image may extend
  beyond the preview window
7 months ago
Junegunn Choi b1a0ab8086
Experimental Sixel support (#2544) 7 months ago
Junegunn Choi d3311d9f43
0.43.0 7 months ago
Junegunn Choi 404b6a864b
Add offset-up and offset-down
# 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

Close #3456
7 months ago
Junegunn Choi 391aa14845
Add mouse events for --bind
Close #3473
7 months ago
Junegunn Choi 2952737755
Update README: Experimental support for Kitty graphics protocol 7 months ago
Junegunn Choi d8188fce7b
Experimental support for Kitty image protocol in preview window
Close #3228

* Works inside and outside of tmux
* There is a problem where fzf unnecessarily displays the scroll offset
  indicator at the topbright of the screen when the image just fits the
  preview window. This is because `kitty icat` generates an extra line
  after the image area.

    # A 5-row images; an extra row at the end confuses fzf
    ["\e_Ga ... \e[9C􎻮̅̅ࠪ􎻮̅̍ࠪ􎻮̅̎ࠪ􎻮̅̐ࠪ􎻮̅̒ࠪ􎻮̅̽ࠪ􎻮̅̾ࠪ􎻮̅̿ࠪ􎻮̅͆ࠪ􎻮̅͊ࠪ􎻮̅͋ࠪ\n",
     "\r\e[9C􎻮̍̅ࠪ􎻮̍̍ࠪ􎻮̍̎ࠪ􎻮̍̐ࠪ􎻮̍̒ࠪ􎻮̍̽ࠪ􎻮̍̾ࠪ􎻮̍̿ࠪ􎻮̍͆ࠪ􎻮̍͊ࠪ􎻮̍͋ࠪ\n",
     "\r\e[9C􎻮̎̅ࠪ􎻮̎̍ࠪ􎻮̎̎ࠪ􎻮̎̐ࠪ􎻮̎̒ࠪ􎻮̎̽ࠪ􎻮̎̾ࠪ􎻮̎̿ࠪ􎻮̎͆ࠪ􎻮̎͊ࠪ􎻮̎͋ࠪ\n",
     "\r\e[9C􎻮̐̅ࠪ􎻮̐̍ࠪ􎻮̐̎ࠪ􎻮̐̐ࠪ􎻮̐̒ࠪ􎻮̐̽ࠪ􎻮̐̾ࠪ􎻮̐̿ࠪ􎻮̐͆ࠪ􎻮̐͊ࠪ􎻮̐͋ࠪ\n",
     "\r\e[9C􎻮̒̅ࠪ􎻮̒̍ࠪ􎻮̒̎ࠪ􎻮̒̐ࠪ􎻮̒̒ࠪ􎻮̒̽ࠪ􎻮̒̾ࠪ􎻮̒̿ࠪ􎻮̒͆ࠪ􎻮̒͊ࠪ􎻮̒͋ࠪ\n",
     "\r\e[39m\e8"]

* Example:

  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 {}
    else
      bat --color=always {}
    fi
  '
8 months ago
Junegunn Choi 00809909ae
Update CHANGELOG 8 months ago
Junegunn Choi 0f50dc848e
Add 'GET /' endpoint for getting the program state (experimental)
Related #3372
9 months ago
Junegunn Choi f50a7058d6
Fix center-alignment of border/preview label
Fix #3421
9 months ago
Junegunn Choi ffd2314120
Restore --no-clear option in man page
Close #3411
9 months ago
Junegunn Choi f83491274f
Add toggle-header option
Close #3358
10 months ago
Boaz Yaniv c0435fdff4
Add API Keys for fzf --listen (#3374) 10 months ago
Junegunn Choi d471067e3f
0.42.0 11 months ago
Junegunn Choi d0b7780239
Add --info=right
Related: #3322
11 months ago
Junegunn Choi e627ca6bd7
Add --info=inline-right
Close #3322
12 months ago
Mike ce8a745fb4
Add new border style: 'thinblock' (#3327)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
12 months ago
Junegunn Choi 6eb1874c5a
0.41.1 12 months ago
Junegunn Choi 098ef4d7cf
0.41.0 1 year ago