Commit Graph

306 Commits

Author SHA1 Message Date
Junegunn Choi
c4df0dd06e
Add TRANSFORM ACTIONS section to man page 2023-12-26 12:21:06 +09:00
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
2023-12-26 00:14:05 +09:00
Junegunn Choi
d7b61ede07
Add support for negative --height
fzf --height=-1

Close #3487
2023-12-21 18:42:23 +09:00
Junegunn Choi
c36a64be68
Add accept-or-print-query
Close #3528
2023-12-10 15:59:45 +09:00
Junegunn Choi
d7d2ac3951
0.44.1 2023-11-17 19:17:00 +09:00
Junegunn Choi
7320b7df62
0.44.0 2023-11-12 22:08:08 +09:00
Junegunn Choi
a818653174
Add --listen-unsafe=ADDR to allow remote process execution (#3498) 2023-11-05 10:53:46 +09:00
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
2023-11-04 16:19:16 +09:00
Junegunn Choi
21ab64e962
sixel: Export $FZF_PREVIEW_TOP to the preview command (#2544)
So that it can determine if it should subtract 1 from $FZF_PREVIEW_LINES
to avoid scrolling issue of Sixel image that touches the bottom of the
screen.
2023-11-02 01:35:36 +09:00
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
2023-10-26 00:49:16 +09:00
Junegunn Choi
b1a0ab8086
Experimental Sixel support (#2544) 2023-10-23 01:05:30 +09:00
Junegunn Choi
d3311d9f43
0.43.0 2023-10-15 01:56:05 +09:00
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
2023-10-11 12:53:51 +09:00
Junegunn Choi
391aa14845
Add mouse events for --bind
Close #3473
2023-10-11 09:42:12 +09:00
Junegunn Choi
2952737755
Update README: Experimental support for Kitty graphics protocol 2023-10-09 01:29:03 +09:00
Junegunn Choi
0f50dc848e
Add 'GET /' endpoint for getting the program state (experimental)
Related #3372
2023-09-03 16:30:35 +09:00
Junegunn Choi
ffd2314120
Restore --no-clear option in man page
Close #3411
2023-08-25 17:59:50 +09:00
Junegunn Choi
11e56403dd
[man] Clarify --scheme option
Close #3387
2023-08-22 15:16:51 +09:00
Junegunn Choi
f83491274f
Add toggle-header option
Close #3358
2023-07-25 22:11:15 +09:00
Boaz Yaniv
c0435fdff4
Add API Keys for fzf --listen (#3374) 2023-07-20 23:42:09 +09:00
Junegunn Choi
a7c41f3fcd
Add '--info=right' to the man page
Close #3333
2023-06-17 19:15:29 +09:00
Junegunn Choi
d471067e3f
0.42.0 2023-06-15 00:37:41 +09:00
Junegunn Choi
e627ca6bd7
Add --info=inline-right
Close #3322
2023-06-10 23:11:05 +09:00
Mike
ce8a745fb4
Add new border style: 'thinblock' (#3327)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-06-10 14:48:29 +09:00
Junegunn Choi
6eb1874c5a
0.41.1 2023-05-27 15:54:22 +09:00
Junegunn Choi
098ef4d7cf
0.41.0 2023-05-26 00:25:09 +09:00
Syphdias
37f258b1bf
Add key combinations for ctrl-delete and shift-delete (#3284)
Currently there is not option to bind ctrl-delete and shift-delete. As
suggested by issue #3240, shift-delete could be used to bind "delete
entry from history" as it is a common way to do so in other
applications, e.g. browsers.

This, however, does only implement to use the key combination itself and
does not assign a default action to any of them. This does enable to
call one's all predefined actions. With the exec action this can
expanded like the issue #3240 suggested.
If desirable, the key combinations could later get a default behavior.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-05-21 18:40:05 +09:00
Junegunn Choi
17a13f00f8
Allow customizing scrollbar of the preview window via --scrollbar=xy 2023-05-16 23:59:08 +09:00
Junegunn Choi
5a39102405
Allow customizing the color of preview scrollbar via 'preview-scrollbar' 2023-05-16 23:24:05 +09:00
Junegunn Choi
fb76893e18
0.40.0 2023-05-01 01:59:21 +09:00
Junegunn Choi
cf95e44cb4
Add 'zero' event
Close #3263
2023-04-26 15:13:08 +09:00
Junegunn Choi
65dd2bb429
Add 'track' action 2023-04-22 23:42:09 +09:00
Junegunn Choi
6be855be6a
Add change-header and transform-header
Close #3237
2023-04-22 22:01:37 +09:00
Junegunn Choi
b6e3f4423b
[man] Suggest setting RUNEWIDTH_EASTASIAN to 0 or 1
Close #2389
2023-04-22 16:35:46 +09:00
Junegunn Choi
7c6f5dba63
Fixed --track when used with --tac
Fix #3234
2023-04-22 15:09:43 +09:00
Junegunn Choi
96670d5f16
Disallow using --track with --tac
Close #3234
2023-04-12 13:23:10 +09:00
Junegunn Choi
20230402d0
0.39.0 2023-04-02 23:33:37 +09:00
Junegunn Choi
8ec917b1c3
Add 'one' event
Close #2629
Close #2494
Close #459
2023-04-01 17:25:47 +09:00
Junegunn Choi
1c7534f009
Add --track option to track the current selection
Close #3186
Related #1890
2023-04-01 12:59:44 +09:00
Junegunn Choi
fcd7e8768d
Omit port number in --listen for automatic port assignment
Close #3200
2023-03-19 15:48:39 +09:00
Zhizhen He
3364d4d147
Add spell check workflow (#3183) 2023-02-23 00:36:04 +09:00
Junegunn Choi
352ea07226
0.38.0 2023-02-15 23:24:42 +09:00
Junegunn Choi
6ea38b4438
Add become(...) action that replaces current fzf process
Close #3159
2023-02-11 20:26:31 +09:00
Junegunn Choi
aa2b9ec476
Add 'show-preview' and 'hide-preview'
For cases where 'toggle-preview' is not enough
2023-01-31 17:34:11 +09:00
Junegunn Choi
2023012408
0.37.0 2023-01-24 22:11:14 +09:00
Junegunn Choi
618d317803
Support custom separator of inline info
Close #2030
Close #3084
2023-01-24 17:55:06 +09:00
Junegunn Choi
284d77fe2e
Add 'focus' event
Can we find a better name? I have considered the followings.

* 'point', because "the pointer" points to the current item.
* 'shift', 'switch', 'move', etc. These are not technically correct
  because the current item can change without cursor movement (--tac,
  reload, search update)
* 'change' is already taken. 'change-current' feels a bit wordy and
  sounds wrong, 'current-changed' is wordy and doesn't go well with the
  other event names
* 'target', not straightforward

Close #3053
2023-01-23 16:38:24 +09:00
Junegunn Choi
d51980a3f5 Add 'transform-border-label' and 'transform-preview-label' 2023-01-22 02:18:19 +09:00
jpcrs
c3d73e7ecb Add change-border-label and change-preview-label actions, update man 2023-01-22 02:18:19 +09:00
Junegunn Choi
2023011763
0.36.0 2023-01-17 01:33:05 +09:00