Commit Graph

345 Commits (master)

Author SHA1 Message Date
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 0f50dc848e
Add 'GET /' endpoint for getting the program state (experimental)
Related #3372
9 months ago
Junegunn Choi ffd2314120
Restore --no-clear option in man page
Close #3411
9 months ago
Junegunn Choi 11e56403dd
[man] Clarify --scheme option
Close #3387
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 a7c41f3fcd
Add '--info=right' to the man page
Close #3333
11 months ago
Junegunn Choi d471067e3f
0.42.0 11 months ago
Junegunn Choi e627ca6bd7
Add --info=inline-right
Close #3322
11 months ago
Mike ce8a745fb4
Add new border style: 'thinblock' (#3327)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
11 months ago
Junegunn Choi 6eb1874c5a
0.41.1 12 months ago
Junegunn Choi 098ef4d7cf
0.41.0 12 months ago
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>
1 year ago
Junegunn Choi 17a13f00f8
Allow customizing scrollbar of the preview window via --scrollbar=xy 1 year ago
Junegunn Choi 5a39102405
Allow customizing the color of preview scrollbar via 'preview-scrollbar' 1 year ago
Junegunn Choi fb76893e18
0.40.0 1 year ago
Junegunn Choi cf95e44cb4
Add 'zero' event
Close #3263
1 year ago
Junegunn Choi 65dd2bb429
Add 'track' action 1 year ago
Junegunn Choi 6be855be6a
Add change-header and transform-header
Close #3237
1 year ago
Junegunn Choi b6e3f4423b
[man] Suggest setting RUNEWIDTH_EASTASIAN to 0 or 1
Close #2389
1 year ago
Junegunn Choi 7c6f5dba63
Fixed --track when used with --tac
Fix #3234
1 year ago
Junegunn Choi 96670d5f16
Disallow using --track with --tac
Close #3234
1 year ago
Junegunn Choi 20230402d0
0.39.0 1 year ago
Junegunn Choi 8ec917b1c3
Add 'one' event
Close #2629
Close #2494
Close #459
1 year ago
Junegunn Choi 1c7534f009
Add --track option to track the current selection
Close #3186
Related #1890
1 year ago
Junegunn Choi fcd7e8768d
Omit port number in `--listen` for automatic port assignment
Close #3200
1 year ago
Zhizhen He 3364d4d147
Add spell check workflow (#3183) 1 year ago
Junegunn Choi 352ea07226
0.38.0 1 year ago
Junegunn Choi 6ea38b4438
Add become(...) action that replaces current fzf process
Close #3159
1 year ago
Junegunn Choi aa2b9ec476
Add 'show-preview' and 'hide-preview'
For cases where 'toggle-preview' is not enough
1 year ago
Junegunn Choi 2023012408
0.37.0 1 year ago
Junegunn Choi 618d317803
Support custom separator of inline info
Close #2030
Close #3084
1 year ago
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
1 year ago
Junegunn Choi d51980a3f5 Add 'transform-border-label' and 'transform-preview-label' 1 year ago
jpcrs c3d73e7ecb Add change-border-label and change-preview-label actions, update man 1 year ago
Junegunn Choi 2023011763
0.36.0 1 year ago
Junegunn Choi 3109b865d2
Fix typo on man page 1 year ago
Junegunn Choi 0c5956c43c
Better support for Windows terminals
* Default border style on Windows is changed to `sharp` because some
  Windows terminals are not capable of displaying `rounded` border
  characters correctly.
* If your terminal emulator renders each box-drawing character with
  2 columns, set `RUNEWIDTH_EASTASIAN` environment variable to `1`.
1 year ago
Junegunn Choi 435d8fa0a2
Colors for 'separator' and 'scrollbar' will default to that for 'border' 1 year ago
Junegunn Choi 5cd6f1d064
Add scrollbar
Close #3096
1 year ago
Junegunn Choi 62c7f59b94
Add transform-prompt(...) action 1 year ago
Junegunn Choi d649f5d826
Always execute preview command if {q} is in the template
Even when {q} is empty. Because, why not?

While this can be seen as a breaking change, there is an easy workaround
to keep the old behavior.

    # This will show // even when the query is empty
    : | fzf --preview 'echo /{q}/'

    # But if you don't want it,
    : | fzf --preview '[ -n {q} ] || exit; echo /{q}/'

Close #2759
1 year ago
Junegunn Choi 6c37177cf5
Add reload-sync action
Close #2816
1 year ago
Junegunn Choi 14775aa975
Add 'load' event that is triggered when the input stream is complete
and the first search (with or without query) is complete
1 year ago
Junegunn Choi 36d2bb332b
Add transform-query(...) action
Test case authored by @SpicyLemon

Close #1930
Close #2465
Close #2559
Close #2509 (e.g. fzf --bind 'space:transform-query:printf %s%s {q} {}')
1 year ago
Junegunn Choi 4dbe45640a
Remove $FZF_LISTEN_PORT
It is not worth the added complexity.
1 year ago
Junegunn Choi 4b3f0b9f08
Allow put action with an argument i.e. put(...) 1 year ago
Junegunn Choi 12af069dca
Add pos(...) action to move the cursor to the numeric position
# Put the cursor on the 10th item
  seq 100 | fzf --sync --bind 'start:pos(10)'

  # Put the cursor on the 10th to last item
  seq 100 | fzf --sync --bind 'start:pos(-10)'

Close #3069
Close #395
1 year ago
Junegunn Choi b7bb973118
Revert "Add GET endpoints for getting the state of the finder"
This reverts commit 750b2a6313.

This can cause a deadlock if the endpoints are accessed in the core event
loop via execute action.

  fzf --listen 6266 --bind 'space:execute:curl localhost:6266'

Technically, there's no reason to use the API because the information is
already available via `{}` and `{q}`, but I'd like to completely remove
the risk of misuse.
1 year ago
Junegunn Choi 750b2a6313
Add GET endpoints for getting the state of the finder
* GET / (or GET /current)
* GET /query
1 year ago
Junegunn Choi 73162a4bc3
Rewrite bind spec parser 1 year ago
Junegunn Choi 1ba7484d60 Add --listen=HTTP_PORT option to receive actions
Supersedes #2019

See also:
* #1728
* https://github.com/junegunn/fzf.vim/pull/1044
1 year ago
Junegunn Choi 51c518da1e
Add change-query(...) action 1 year ago
Junegunn Choi 18e3b38c69
Add 'next-selected' and 'prev-selected' actions
Close #2749
1 year ago
Junegunn Choi 0ad30063ff
Rename previous-history to prev-history
previous-history is still supported for backward compatibility
1 year ago
Junegunn Choi 3d2376ab52
Add color name 'preview-label' (#3053) 1 year ago
Junegunn Choi b55f555487
0.35.1 2 years ago
Bruno Heridet 3da63f394d
doc(man): complete the definition of what --no-unicode impacts (#3054) 2 years ago
Junegunn Choi d01ae55109
0.35.0 2 years ago
Junegunn Choi 8868d7d188
Add --separator to customize the info separator 2 years ago
Junegunn Choi 01ae621f11
Add --border=[bold|double] and --preview-window=border-[bold|double] 2 years ago
Junegunn Choi c09ec8e4d1
Allow putting border label on the bottom line
Related #3022
2 years ago
Junegunn Choi b9ca1fe830
Add horizontal separator after info panel (counter)
Close #3029
2 years ago
Junegunn Choi e61585f2f3
Add --border-label and --border-label-pos
Close #3022
2 years ago
Junegunn Choi 168829b555
Add 'start' event that is triggered once when fzf finder starts
Close #1622
2 years ago
Bruno Heridet cefa6b9878
doc(man): add a hint about which UI element is the finder info (#2991)
While reading the description of the --info flag, it's not
immediately obvious that the "finder info" is in fact the
UI element representing the match counters.
2 years ago
Junegunn Choi 04d0b0223f
0.34.0 2 years ago
Junegunn Choi 78ad6d2d88
Phase out --no-clear in favor of bindable 'reload' action 2 years ago
Junegunn Choi 22cbd9fa58
Implement height range (--height ~[VALUE][%])
Close #2953
2 years ago
Junegunn Choi 6fb41a202a
Add --scheme=[default|path|history] option to choose scoring scheme
Close #2909
Close #2930
2 years ago
Emil Vanherp 4bef330ce1
Add support for ANSI strike-through (#2932)
Close #2932

Co-authored-by: Emil Vanherp <emil@vanherp.me>
2 years ago
Junegunn Choi c1c355160d
Support border-{up,down} as the synonyms for border-{top,bottom} 2 years ago
Junegunn Choi 4993d19466
0.32.1 2 years ago
Junegunn Choi f0bfeba733
Add new tiebreak: 'chunk'
Favors the line with shorter matched chunk. A chunk is a set of
consecutive non-whitespace characters.

Unlike the default `length`, this new scheme works well with tabular input.

  # length prefers item #1, because the whole line is shorter,
  # chunk prefers item #2, because the matched chunk ("foo") is shorter
  fzf --height=6 --header-lines=2 --tiebreak=chunk --reverse --query=fo << "EOF"
  N | Field1 | Field2 | Field3
  - | ------ | ------ | ------
  1 | hello  | foobar | baz
  2 | world  | foo    | bazbaz
  EOF

If the input does not contain any spaces, `chunk` is equivalent to
`length`. But we're not going to set it as the default because it is
computationally more expensive.

Close #2285
Close #2537
- Not the exact solution to --tiebreak=length not taking --nth into account,
  but this should work. And the added benefit is that it works well even
  when --nth is not provided.
- Adding a bonus point to the last character of a word didn't turn out great.
  The order of the result suddenly changes when you type in the last
  character in the word producing a jarring effect.
2 years ago
Junegunn Choi ecc418ba77
0.31.0 2 years ago
Junegunn Choi 82b46726fc
Add support for an alternative preview window layout
Close #2804
Close #2844

Related #2277
2 years ago
Junegunn Choi 2d227e5222
[man] Fix unescaped backslash in awk example
Close #2854
2 years ago
Junegunn Choi d56f605b63
Add `rebind` action for restoring bindings after `unbind`
Fix #2752
Close #2564
2 years ago
Junegunn Choi ef67a45702
Add --ellipsis=.. option
Close #2432

Also see
- #1769
- https://github.com/junegunn/fzf/pull/1844#issuecomment-586663660
2 years ago
Junegunn Choi dc975e8974
0.29.0 2 years ago
Junegunn Choi 43f0d0cacd
change-preview-window to take multiple option sets separated by '|'
So you can "rotate" through the different options with a single binding.

  fzf --preview 'cat {}' \
      --bind 'ctrl-/:change-preview-window(70%|down,40%,border-horizontal|hidden|)'

Close #2376
2 years ago
Junegunn Choi 20b4e6953e
Implement change-preview and change-preview-window actions
The new actions are named with 'change-' prefix to differentiate from
the pre-existing, one-off 'preview(...)' action.

Fix #2360
Fix #2505
Fix #2666

Related #2435
Related #2376
  - Can set up multiple bindings with different change-preview-window actions
  - Not possible to "rotate" through the options with a single binding
  - Enlarge or shrink not possible
3 years ago
Junegunn Choi e4c3ecc57e
0.28.0 3 years ago
Junegunn Choi 673c5d886d
Add 'put' action for putting the character to the prompt
fzf --bind 'space:preview(date)+put'

Close #2456
3 years ago
Junegunn Choi 7bff4661f6
Add --header-first option to display header before prompt line
Close #2422
3 years ago
Junegunn Choi 02cee2234d
Implement --scroll-off=LINES
Close #2533
3 years ago
Junegunn Choi 4138333f5c
0.27.3 3 years ago
Junegunn Choi e086f0b3fe
0.27.2 3 years ago
Junegunn Choi a4bc08f5a3
Allow specifying 16 base ANSI colors by their names
Close #2502
3 years ago
Junegunn Choi 0818dbc36a
0.27.1 3 years ago
Junegunn Choi 347c4b2625
Add 'unbind' action
Fix #2486
3 years ago
Junegunn Choi 34f0d4d0c4
[man] Clarification on --select-1 and --exit-0 3 years ago
Junegunn Choi 19759ed36e
0.27.0 3 years ago
Junegunn Choi da1f645670
Change --preview-window delimiter from : to , for consistency
Delimiter : was chosen when --preview-option only supported position and
size attributes. e.g. up:50%
3 years ago
Junegunn Choi 15f4cfb6d9
More border optins for preview window
Close #2431
3 years ago
Junegunn Choi 1b08f43f82
Advanced preview scroll offset expression to better support fixed header 3 years ago
Junegunn Choi 4c4c6e626e
Add support for preview window header
Fix #2373

  # Display top 3 lines as the fixed header
  fzf --preview 'bat --style=header,grid --color=always {}' --preview-window '~3'
3 years ago