Commit Graph

247 Commits (20230117636c9dfa3ed6f6428c5bc4c51b02f60a)

Author SHA1 Message Date
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 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 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 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
2 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