Commit Graph

321 Commits

Author SHA1 Message Date
Junegunn Choi dc975e8974
0.29.0 2021-12-25 01:46:01 +09:00
Junegunn Choi cd23401411
Fix rendering of the prompt line when overflow occurs with `--info=inline`
Fix #2692
2021-12-22 23:23:50 +09:00
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
2021-12-05 21:13:10 +09:00
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
2021-11-30 23:57:46 +09:00
Junegunn Choi 7bff4661f6
Add --header-first option to display header before prompt line
Close #2422
2021-11-03 21:19:22 +09:00
Junegunn Choi ffd8bef808
Update CHANGELOG 2021-11-02 21:48:19 +09:00
Junegunn Choi 4138333f5c
0.27.3 2021-10-15 23:59:56 +09:00
Junegunn Choi 0f02fc0c77
Reset {n} after reload
Fix #2611
2021-09-14 20:36:10 +09:00
a1346054 3c804bcfec fix spelling 2021-08-15 16:03:26 +09:00
Junegunn Choi 7191ebb615
Do not show preview window by default if `--preview` is empty
Close #2516
2021-06-08 08:53:29 +09:00
Junegunn Choi 8255aa23f4
Fix bug where `--read0` not properly displaying long lines
Fix #2508
2021-06-01 16:55:51 +09:00
Junegunn Choi a4bc08f5a3
Allow specifying 16 base ANSI colors by their names
Close #2502
2021-05-26 19:35:26 +09:00
Junegunn Choi 347c4b2625
Add 'unbind' action
Fix #2486
2021-05-22 13:16:39 +09:00
Junegunn Choi 19759ed36e
0.27.0 2021-04-06 22:53:59 +09:00
Junegunn Choi c440418ce6
Sign and notarize macOS binaries
Close #2408
2021-04-06 18:09:06 +09:00
Junegunn Choi 15f4cfb6d9
More border optins for preview window
Close #2431
2021-04-06 17:37:11 +09:00
Junegunn Choi 1b08f43f82
Advanced preview scroll offset expression to better support fixed header 2021-03-13 02:26:41 +09:00
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'
2021-03-12 20:32:27 +09:00
Junegunn Choi c256442245
Fix typo 2021-02-28 18:27:21 +09:00
Junegunn Choi 76bbf57b3d
Add select and deselect actions
Close #2358
2021-02-25 21:23:05 +09:00
Junegunn Choi 6654239c94
0.25.1 2021-02-03 22:32:52 +09:00
Junegunn Choi f55c990e86
Add `close` action
Close #2331
2021-02-02 00:11:05 +09:00
Junegunn Choi d779ff7e6d
Make search toggleable
- `--phony` renamed to `--disabled` for consistency
    - `--no-phony` is now `--enabled`
- Added `enable-search`, `disable-search`, and `toggle-search` actions
  for `--bind`
- Added `--color` options: `query` and `disabled`

Close #2303
2021-01-03 00:15:00 +09:00
Junegunn Choi 151252e33a
Add preview-top and preview-bottom actions 2020-12-31 12:57:57 +09:00
Junegunn Choi 7f8e0dbc40
Extend support for alt key chords
"alt-" with any case-sensitive character is allowed
2020-12-30 18:39:17 +09:00
Junegunn Choi 0de7ab18f6
Add "last" action to move the cursor to the last match
This is the opposite of "first" (previously known as "top").
2020-12-30 18:39:17 +09:00
Junegunn Choi 257ddd028d
Update CHANGELOG 2020-12-07 19:35:48 +09:00
Junegunn Choi 2ec382ae0e
Add --preview-window follow option 2020-12-05 21:16:35 +09:00
Junegunn Choi 6d647e13ff
Add change-prompt action
Close #2270
2020-12-04 20:34:41 +09:00
Junegunn Choi f6269f0193
Add --padding option
Close #2241
2020-11-09 20:37:17 +09:00
Junegunn Choi 1bcbc5a353
Fix regression where lines are skipped in the preview window
Fix #2239
2020-11-03 21:31:19 +09:00
Junegunn Choi d4c9db0a27
0.24.1 2020-10-29 01:45:55 +09:00
Junegunn Choi 0d5f862daf
0.24.0 2020-10-27 23:57:18 +09:00
Junegunn Choi 552414978e
0.24.0-rc1 2020-10-27 11:07:27 +09:00
Junegunn Choi 2e8e63fb0b
Add more --border options
Instead of drawing the window border in Vim using an extra window,
extend the --border option so that we do can it natively.

Close #2223
Fix #2184
2020-10-26 22:51:22 +09:00
Junegunn Choi 874f7dd416
Update --color example in CHANGELOG
New color name: input
2020-10-26 00:22:06 +09:00
Junegunn Choi 8b0e3b1624
Update --color docs 2020-10-26 00:15:30 +09:00
Junegunn Choi 11841f688b
Add support for text styling using --color
Close #1663
2020-10-25 19:30:41 +09:00
Junegunn Choi a4d9b0b468
Support ANSI escape sequence for clearing display in preview window
fzf --preview 'for i in $(seq 100000); do
    (( i % 200 == 0 )) && printf "\033[2J"
    echo "$i"
    sleep 0.01
  done'
2020-10-23 21:37:20 +09:00
Junegunn Choi faf68dbc5c
Implement streaming preview window (#2215)
Fix #2212

    # Will start rendering after 200ms, update every 100ms
    fzf --preview 'for i in $(seq 100); do echo $i; sleep 0.01; done'

    # Should print "Loading .." message after 500ms
    fzf --preview 'sleep 1; for i in $(seq 100); do echo $i; sleep 0.01; done'

    # The first line should appear after 200ms
    fzf --preview 'date; sleep 2; date'

    # Should not render before enough lines for the scroll offset are ready
    rg --line-number --no-heading --color=always ^ |
      fzf --delimiter : --ansi --preview-window '+{2}-/2' \
          --preview 'sleep 1; bat --style=numbers --color=always --pager=never --highlight-line={2} {1}'
2020-10-18 17:03:33 +09:00
Junegunn Choi fc7630a66d
0.23.1 2020-10-11 02:04:07 +09:00
Junegunn Choi 3248153d9f
Add --preview-window=default for resetting the options 2020-10-11 01:54:39 +09:00
Junegunn Choi 865144850d
Add nowrap, nocycle, nohidden for --preview-window
Close #2203
2020-10-09 21:56:16 +09:00
Junegunn Choi d9752a4c21
Reset preview window flags that are not style-related
Fix #2203
2020-10-09 19:53:51 +09:00
Junegunn Choi dba14d2630
0.23.0 2020-10-07 19:18:50 +09:00
Junegunn Choi 3cc8a74a91
Add --preview-window option for cyclic scrolling
Close #2182
2020-10-06 10:05:57 +09:00
Tinmarino c0aa5a438f
Add preview-half-page-down and preview-half-page-up (#2145) 2020-10-05 21:58:56 +09:00
Junegunn Choi e0f0b5bcf9
Update CHANGELOG 2020-09-09 00:06:53 +09:00
Junegunn Choi 9dc4b40d7a
Add more preview window options and reduce vertical padding on noborder
Fix #2138
Fix #2029
2020-08-23 17:05:45 +09:00
Junegunn Choi 1cb19dbf65
Support preview scroll offset relative to window height
Related: https://github.com/junegunn/fzf.vim/issues/1092
2020-08-23 15:57:49 +09:00
Junegunn Choi e2ae1b249c
0.22.0 2020-08-02 15:56:02 +09:00
Junegunn Choi f092e4038f
Smart match of accented characters
Fix #1618
2020-07-28 13:06:57 +09:00
Junegunn Choi 0f9cb5590e
Add preview window option for setting the initial scroll offset
Close #1057
Close #2120

  # Initial scroll offset is set to the line number of each line of
  # git grep output *minus* 5 lines
  git grep --line-number '' |
    fzf --delimiter : --preview 'nl {1}' --preview-window +{2}-5
2020-07-27 00:27:03 +09:00
Junegunn Choi 8e027c445f
Support ANSI colors in --prompt string
Close #2086
2020-07-05 16:16:46 +09:00
Junegunn Choi d1676776aa
Update CHANGELOG 2020-06-30 21:17:19 +09:00
Junegunn Choi 334a4fa159
0.21.1 2020-04-03 17:33:29 +09:00
Junegunn Choi b0673c3563
0.21.0 2020-03-12 13:15:45 +09:00
Junegunn Choi 373c6d8d55
Add --keep-right option to keep the right end of the line visible
Close #1652
2020-03-11 22:35:24 +09:00
Junegunn Choi 50b7608f9d
Change custom fuzzy completion API
To make it easier to write more complex fzf options. Although this
does not break backward compatibility, users are encouraged to update
their code accordingly.

  # Before
  _fzf_complete "FZF_ARG1 FZF_ARG2..." "$@" < <(
    # Print candidates
  )

  # After
  _fzf_complete FZF_ARG1 FZF_ARG2... -- "$@" < <(
    # Print candidates
  )
2020-03-11 18:32:35 +09:00
Michael Kelley 7d5985baf9
Make height option work under Windows (#1341)
Separate Unix & Windows code into platform specific files for light renderer
2020-03-10 00:03:34 +09:00
Junegunn Choi d9c6a0305b
Draft CHANGELOG for the upcoming release 2020-03-05 23:12:27 +09:00
Junegunn Choi 30577b0c17
0.20.0 2019-12-18 01:07:25 +09:00
Junegunn Choi 9fefe08b3f
Revert README as preview-{fg,bg} are only available on master 2019-12-13 12:46:27 +09:00
Junegunn Choi 684bfff713
Update README/CHANGELOG 2019-12-13 12:43:34 +09:00
Junegunn Choi 3db6b88d82
Add preview-fg and preview-bg for --color
Close #1776
2019-12-12 23:03:17 +09:00
Junegunn Choi af1a5f130b
Add clear-query and clear-selection
Close #1787
Related #1364
2019-12-07 14:44:24 +09:00
Junegunn Choi 86e3994e87 Properly clear list when --header-lines not filled on reload 2019-12-06 22:34:45 +09:00
Junegunn Choi 394d8cfd18
Remove immediate flickering on reload action 2019-12-05 22:27:18 +09:00
Junegunn Choi effbc258bb Update CHANGELOG 2019-11-21 23:06:14 +09:00
Junegunn Choi 7238c8944d
Update CHANGELOG 2019-11-16 01:23:01 +09:00
Junegunn Choi e24299239e
Add `--preview-window noborder` option to disable preview border
Close #1699
2019-11-15 11:39:51 +09:00
Junegunn Choi d2fa470165
Add --info=STYLE [default|inline|hidden]
Close #1738
2019-11-15 00:39:29 +09:00
Junegunn Choi 168453da71
More key chords for --bind
Close #1752
2019-11-14 22:39:35 +09:00
Junegunn Choi 23a06d63ac
Update CHANGELOG and man pages 2019-11-13 01:27:39 +09:00
Junegunn Choi ff951341c9
0.18.0 2019-03-31 11:22:38 +09:00
Junegunn Choi b46227dcb6
0.17.5 2018-10-07 01:46:29 +09:00
Junegunn Choi f0fe79dd3b
0.17.4 2018-06-10 10:35:52 +09:00
Junegunn Choi 390b49653b
0.17.3 2017-12-03 23:55:24 +09:00
Junegunn Choi 04aa2992e7
Revert "0.17.2"
This reverts commit 2f1edeff78.
2017-12-03 23:42:38 +09:00
Junegunn Choi 2f1edeff78
0.17.2 2017-12-03 23:34:37 +09:00
Junegunn Choi 0b33dc6ce1
0.17.1 2017-10-16 01:58:57 +09:00
Junegunn Choi 58b5be8ab6
0.17.0-2 2017-09-05 13:40:58 +09:00
Junegunn Choi e89eebb7ba
0.17.0 2017-08-27 03:32:21 +09:00
Junegunn Choi ecb6b234cc
0.16.11 2017-08-02 02:50:28 +09:00
Junegunn Choi 6dbc108da2
0.16.10 2017-07-21 18:41:11 +09:00
Junegunn Choi 18a1aeaa91
0.16.9 2017-07-21 00:08:55 +09:00
Uri Gorelik a4d78e2200 Update CHANGELOG with unix-line-discard+top (#940)
Also change the example binding for `unix-word-rubout` to *ctrl-w* instead of *ctrl-u*
2017-06-08 10:02:34 +09:00
Junegunn Choi b49f22cdf9
0.16.8 2017-06-05 23:21:50 +09:00
Junegunn Choi 2d61691bb2
0.16.7 2017-04-30 11:54:40 +09:00
Junegunn Choi e03e91477b
0.16.6 2017-03-05 03:05:06 +09:00
Junegunn Choi e87a85a179
0.16.5 2017-02-19 01:40:25 +09:00
Junegunn Choi c82fb3c9b9
Add toggle-preview-wrap action 2017-02-18 23:49:00 +09:00
Junegunn Choi 4b700192c1
Add --border option to draw horizontal lines above and below the finder
Goes well with --height
2017-02-04 21:51:22 +09:00
Junegunn Choi 36dceecd58
Add support for ctrl-space key
Close #825
2017-01-28 02:54:47 +09:00
Junegunn Choi 421b9b271a
Add execute-silent action
Close #823
2017-01-27 18:56:41 +09:00
Junegunn Choi ed57dcb924
Extend placeholder expression for multiple selections
Close #788
2017-01-27 16:38:42 +09:00
Junegunn Choi f2ce233a6d
0.16.2 2017-01-24 00:37:47 +09:00
Junegunn Choi 6a75e30941
Allow invisible preview window (--preview-window 0)
Close #820
2017-01-24 00:23:16 +09:00
Junegunn Choi ff248d566d
Drop ncurses dependency
Close #818
2017-01-22 14:13:37 +09:00
Junegunn Choi 131aa5dd15
Composable actions in --bind
Close #816
2017-01-22 02:32:49 +09:00
Junegunn Choi 62ab8ece5e
0.16.1 2017-01-16 12:27:40 +09:00
Junegunn Choi 4bece04207
0.16.0 2017-01-16 02:39:37 +09:00
Junegunn Choi e0036b5ad2
Add --filepath-word option
Close #802
2017-01-15 19:42:28 +09:00
Junegunn Choi 4ecb7f3a16
Replace --normalize with --literal and enable normalization by default
Ref #790
2017-01-15 13:22:09 +09:00
Junegunn Choi 45793d75c2
Add --normalize option to normalize latin script characters
Close #790
2017-01-09 03:12:23 +09:00
Junegunn Choi 1448d631a7
Add --height option 2017-01-08 02:09:56 +09:00
Junegunn Choi 67026718c1
Add BUILD.md 2016-11-27 15:16:53 +09:00
Junegunn Choi a71c471405
0.15.9 2016-11-26 12:36:24 +09:00
Junegunn Choi 6a65006f55
0.15.8 2016-11-19 23:13:26 +09:00
Junegunn Choi a2beb159f1
0.15.7 2016-11-09 12:41:46 +09:00
Junegunn Choi a221c672fb
0.15.6 2016-11-09 01:45:27 +09:00
Junegunn Choi 9f30ca2923
0.15.5 2016-10-23 22:00:32 +09:00
Junegunn Choi 3222d62ddf
0.15.4 2016-10-04 02:17:36 +09:00
Junegunn Choi 957c12e7d7
Fix SEGV when trying to render preview but the window is closed
Close #677
2016-09-29 02:53:05 +09:00
Junegunn Choi 1bc223d4b3
0.15.2 2016-09-25 22:20:43 +09:00
Junegunn Choi 7fa5e6c861
0.15.1 2016-09-21 01:28:24 +09:00
Junegunn Choi 37f43fbb35
Add --print0 option
Related: #660
2016-09-19 01:15:38 +09:00
Junegunn Choi 2fc7c18747
Revise ranking algorithm 2016-09-18 14:34:46 +09:00
Junegunn Choi b86838c2b0
0.13.5 2016-08-21 05:02:45 +09:00
Junegunn Choi c4c92142a6
0.13.4 2016-08-14 18:10:21 +09:00
Junegunn Choi fccc93176b
0.13.3 2016-07-16 01:06:53 +09:00
Junegunn Choi 5759d50d4a
0.13.2 2016-06-16 02:16:13 +09:00
Junegunn Choi 8a90f26c8a
0.13.1 2016-06-14 21:53:00 +09:00
Junegunn Choi 3e1d6a7bcf
0.13.0 2016-06-12 02:15:11 +09:00
Junegunn Choi 56fb2f00b3
Use single-quoted strings in execute action
Close #590
2016-06-08 00:54:21 +09:00
Junegunn Choi 2f364c62f4
0.12.2 2016-05-19 01:55:54 +09:00
Junegunn Choi 35a9aff8e1 0.12.1 2016-04-25 01:23:52 +09:00
Junegunn Choi 879ead210f 0.11.2 2016-04-16 14:37:16 +09:00
Junegunn Choi b47ab633e2 0.11.4 2016-03-03 01:57:28 +09:00
Junegunn Choi 40d934e378 0.11.3 2016-02-07 11:00:10 +09:00
Junegunn Choi 68c84264af Update CHANGELOG 2016-01-16 21:13:57 +09:00
Junegunn Choi 69438a55ca Update CHANGELOG: 0.11.2 2016-01-16 21:11:40 +09:00
Junegunn Choi 95970164ad 0.11.2 2016-01-14 02:54:08 +09:00
Junegunn Choi 45143f9541 Ignore leading whitespaces when calculating 'begin' index 2016-01-14 01:32:03 +09:00
Junegunn Choi 1d2d32c847 Accept comma-separated list of sort criteria 2016-01-13 21:27:43 +09:00
Junegunn Choi 99ea1056ac Add --tabstop option
Related: https://github.com/junegunn/fzf.vim/issues/49
2015-11-30 17:35:03 +09:00
Junegunn Choi df468fc482 0.11.0 2015-11-10 01:54:53 +09:00
Junegunn Choi 6bddffbca4 Setup signal handlers before ncurses initialization
This prevents fzf from missing SIGWINCH during startup which
occasionally happens with fzf-tmux
2015-11-03 23:00:34 +09:00
Junegunn Choi 81a88693c1 Make --extended default
Close #400
2015-11-03 22:49:32 +09:00
Junegunn Choi b3010a4624 0.10.8 2015-10-09 12:42:07 +09:00
Junegunn Choi 1da065e50e 0.10.7 2015-10-05 23:28:24 +09:00
Junegunn Choi d980e00961 Revert "Revert "0.10.6""
This reverts commit 987799f8fb.
2015-09-19 22:51:12 +09:00
Junegunn Choi 987799f8fb Revert "0.10.6"
This reverts commit d2f3604c1d.
2015-09-19 22:27:09 +09:00
Junegunn Choi d2f3604c1d 0.10.6 2015-09-19 22:18:04 +09:00
Junegunn Choi 2022a3ad96 Replace --header-file with --header (#346)
and allow using --header and --header-lines at the same time.

Close #346.
2015-09-15 19:04:53 +09:00
Junegunn Choi de829c0938 0.10.5 2015-09-12 12:50:32 +09:00
Junegunn Choi 9a2d9ad947 0.10.4 2015-08-29 02:36:27 +09:00
Junegunn Choi d0f2c00f9f Fix --with-nth performance; use simpler regular expression
Related #317
2015-08-11 00:15:41 +09:00
Junegunn Choi 766427de0c Fix --with-nth performance; avoid regex if possible
Close #317
2015-08-10 18:34:20 +09:00
Junegunn Choi e83ae34a3b Update CHANGELOG - 0.10.2 2015-08-02 14:32:34 +09:00
Junegunn Choi ee0c8a2635 Add --margin option
Close #299
2015-07-26 23:02:04 +09:00
Junegunn Choi fdbf3d3fec Replace eof action with cancel (#289) 2015-07-23 21:05:33 +09:00
Junegunn Choi 13e040baee Bind CTRL-D to the new delete-char/eof action
- CTRL-D - delete-char/eof
- DEL - delete-char
2015-07-23 00:56:03 +09:00
Junegunn Choi cc0d5539ba Add "eof" action which closes the finder only when input is empty
Close #289
2015-07-22 22:57:48 +09:00
Junegunn Choi bbaa3ab8bd Update CHANGELOG 2015-07-22 14:19:55 +09:00
Junegunn Choi a336494f5d 0.10.0 2015-06-21 17:40:36 +09:00
Junegunn Choi 52771a6226 0.9.13 2015-06-03 02:09:07 +09:00
Junegunn Choi 446e822723 Update CHANGELOG 2015-05-22 02:37:38 +09:00
Junegunn Choi 34946b72a5 0.9.12 2015-05-21 00:44:49 +09:00
Junegunn Choi a4cf5510e3 0.9.11 2015-04-22 01:42:38 +09:00
Junegunn Choi f66d94c6b0 Add `--color=[dark|light|16|bw]` option
- dark:  the current default for 256-color terminal
- light: color scheme for 256-color terminal with light background
- 16:    the default color scheme for 16-color terminal (`+2`)
- bw:    no colors (`+c`)
2015-04-18 02:55:17 +09:00
Junegunn Choi 2fe1e28220 Improvements in performance and memory usage
I profiled fzf and it turned out that it was spending significant amount
of time repeatedly converting character arrays into Unicode codepoints.
This commit greatly improves search performance after the initial scan
by memoizing the converted results.

This commit also addresses the problem of unbounded memory usage of fzf.
fzf is a short-lived process that usually processes small input, so it
was implemented to cache the intermediate results very aggressively with
no notion of cache expiration/eviction. I still think a proper
implementation of caching scheme is definitely an overkill. Instead this
commit introduces limits to the maximum size (or minimum selectivity) of
the intermediate results that can be cached.
2015-04-17 22:23:52 +09:00
Junegunn Choi d1d59272a2 Add visual indication of --toggle-sort
Close #194
2015-04-16 14:46:10 +09:00
Junegunn Choi d08542ce5d Prepare for 0.9.9 release 2015-04-16 14:34:40 +09:00
Junegunn Choi 2d68cb8639 Fix #185 - Terminate on RuneError 2015-04-14 23:19:55 +09:00
Junegunn Choi 5c25984ea0 Fix Unicode case handling (#186) 2015-04-14 21:45:37 +09:00
Junegunn Choi 50292adacb Implement --toggle-sort option (#173) 2015-03-31 22:05:16 +09:00
Junegunn Choi 2a167aa030 Implement --expect option to support simple key bindings (#163) 2015-03-29 02:59:32 +09:00
Junegunn Choi 9ffcd26d50 Update CHANGELOG - 0.9.5 2015-03-22 16:21:52 +09:00
Junegunn Choi b15a0e9650 Update CHANGELOG 2015-03-01 12:31:49 +09:00
Junegunn Choi c1aa5c5f33 Add --tac option and reverse display order of --no-sort
DISCLAIMER: This is a backward incompatible change
2015-02-26 01:42:15 +09:00