Commit Graph
100 Commits
Author SHA1 Message Date
Junegunn Choi bbbcd780c9 Allow "--version" to be used as the argument to --query, --header, et al.
But why?
2022-08-02 20:57:12 +09:00
Junegunn Choi 3a7447dcb6 Update FUNDING.yml 2022-07-30 19:35:41 +09:00
Junegunn Choi e5d8cbd383 [vim] Fix version check on windows/powershell (addendum)
Should handle powershell.exe as well

Fix https://github.com/junegunn/fzf.vim/issues/1411
2022-07-30 19:08:04 +09:00
Junegunn Choi 3c08dca7e7 Fix README examples so that they work both on bash and zsh
Close #2887
2022-07-29 22:03:02 +09:00
Junegunn Choi 18f7230662 Fix mouse location in --height mode
Fix #2900
2022-07-29 15:42:44 +09:00
Junegunn Choi ecc418ba77 0.31.0 2022-07-21 23:04:57 +09:00
Junegunn Choi 3af5b7f2ac Do not validate other options when --version is present
Close #2690
2022-07-21 22:36:52 +09:00
Junegunn Choi 7a7cfcacbe Lift unicode.IsGraphic constraint for pointer, marker, and ellipsis
Use at your own risk.

Close #2709
Close #2055
2022-07-21 22:30:01 +09:00
Junegunn Choi 52594355bf [shell] 'kill' completion will now require trigger sequence (**)
'kill **<tab>' instead of 'kill <tab>' just like any other completions.

Close #2716
Close #385
2022-07-21 22:21:11 +09:00
Junegunn Choi 0d06c28b19 Fix delimiter regex to properly support caret (^)
Fix #2861
2022-07-21 21:21:06 +09:00
Junegunn Choi ccc4677252 [vim] fzf#exec: Shell-escape fzf binary path
Fix #2877
2022-07-20 14:29:52 +09:00
Junegunn Choi 821fc9feed Fix failing test case 2022-07-20 12:29:45 +09:00
Junegunn Choi 82b46726fc Add support for an alternative preview window layout
Close #2804
Close #2844

Related #2277
2022-07-20 12:08:54 +09:00
Junegunn Choi 51fdaad002 [uninstall] Remove readlink to support relative symlinks of dotfiles
Close #2853
2022-07-01 16:32:32 +09:00
Junegunn Choi 2d227e5222 [man] Fix unescaped backslash in awk example
Close #2854
2022-06-23 15:45:36 +09:00
Junegunn Choi 70529878e2 Use SGR mouse mode for larger terminals
Fix #2840
2022-06-17 12:48:04 +09:00
Junegunn Choi b089bb5e7b Fix scrollability of the preview window in certain cases
Fix #2683

This commit fixes the cases where fzf incorrectly determines the
scrollability of the preview window when `--preview-window-wrap` is set.

Wrapping of the preview content happens during the rendering phase, so
it's currently not possible to know how many lines are actually needed
to display the content beforehand. So `preview-bottom` still may not
move to the very bottom with wrapping enabled.
2022-04-28 11:46:24 +09:00
Junegunn Choi a0b42e6538 Require Go 1.17 or above 2022-04-07 20:31:19 +09:00
Junegunn Choi 2093667548 0.30.0 2022-04-04 23:01:43 +09:00
Junegunn Choi 3c868d7961 ADVANCED.md: Add rebind example 2022-04-04 22:59:26 +09:00
Junegunn Choi b3ab6311c5 Hide cursor while rendering the screen
Fix #2781
Fix #2588
Fix #1805

Fix https://github.com/junegunn/fzf.vim/issues/1370
Fix https://github.com/junegunn/fzf.vim/issues/1060
2022-04-04 22:06:16 +09:00
Junegunn Choi d56f605b63 Add rebind action for restoring bindings after unbind
Fix #2752
Close #2564
2022-04-04 21:54:22 +09:00
Junegunn Choi f8b713f425 Remove redundant state update on reload
Related: 5209e95
2022-03-31 10:05:28 +09:00
Junegunn Choi 5209e95bc7 Make preview updated when reload and change-query are combined
Fix #2744
2022-03-29 22:27:03 +09:00
Junegunn Choi ef67a45702 Add --ellipsis=.. option
Close #2432

Also see
- #1769
- https://github.com/junegunn/fzf/pull/1844#issuecomment-586663660
2022-03-29 21:35:36 +09:00
Junegunn Choi b88eb72ac2 Modernize build tags 2022-03-29 21:23:45 +09:00
Junegunn Choi a06671b47f Increase TTY buffer limit
Kitty's shell intergration generates a long sequence of key presses in
certain cases. As long as the length of the sequence is finite, fzf can
process it.

Close #2748
2022-03-09 17:02:06 +09:00
Junegunn Choi 5f385d88e0 [zsh] Set up bindings for all three keymaps: emacs, vicmd, and viins
Fix #2694
2022-02-23 15:36:49 +09:00
Junegunn Choi 9cb7a364a3 [install] Remove code that might delete user fish script
Fix #2703
2022-01-05 21:48:20 +09:00
Junegunn Choi f68cbc577d Add link to ADVANCED.md
Related #2701
2022-01-03 13:52:46 +09:00
Junegunn Choi dc975e8974 0.29.0 2021-12-25 01:46:01 +09:00
Junegunn Choi 4311ade535 ADVANCED.md: Add change-preview-window example 2021-12-24 14:41:47 +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 13c8f3d3aa [vim] Handle writefile() failure gracefully
Fix #2676
2021-12-07 17:33:26 +09:00
Junegunn Choi ce9af687bc Remove unused code 2021-12-05 21:17:38 +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 3715cd349d Add repology packaging status badge 2021-11-18 15:47:06 +09:00
Junegunn Choi e4c3ecc57e 0.28.0 2021-11-04 01:05:07 +09:00
Junegunn Choi 673c5d886d Add 'put' action for putting the character to the prompt
fzf --bind 'space:preview(date)+put'

Close #2456
2021-11-04 00:49:05 +09:00
Junegunn Choi f799b568d1 [bash] Suppress error message from 'bind'
Fix #2618
2021-11-03 23:26:25 +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 02cee2234d Implement --scroll-off=LINES
Close #2533
2021-11-02 21:48:19 +09:00
Junegunn Choi edac9820b5 Cache cygpath result
No need to repeatedly run cygpath process because $SHELL never changes.
2021-10-25 18:46:59 +09:00
Junegunn Choi 97ae8afb6f Reload should update preview window
Fix #2644
2021-10-23 01:06:15 +09:00
Junegunn Choi 4138333f5c 0.27.3 2021-10-15 23:59:56 +09:00
Junegunn Choi 50eb2e3855 Render spinner on info line during "reload"
Fix #2637
2021-10-15 22:13:57 +09:00
Junegunn Choi 2736a2f69e [vim] Empty out $FZF_DEFAULT_COMMAND before unletting it
For Vim 8.0.1831 and below
* https://github.com/vim/vim/issues/1116

Fix https://github.com/junegunn/fzf.vim/issues/1301
2021-10-10 20:19:48 +09:00
Junegunn Choi 4173e94c6f Do not check for --height support on --version
https://github.com/junegunn/fzf.vim/issues/1329
2021-09-29 20:17:44 +09:00
Junegunn Choi 0f02fc0c77 Reset {n} after reload
Fix #2611
2021-09-14 20:36:10 +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 a74731d7f5 [vim] Add 'sinklist' as a synonym to 'sink*'
So that it's easier to add a sinklist function to a spec dictionary.

  let spec = { 'source': source, 'options': ['--preview', preview] }
  function spec.sinklist(matches)
    echom string(a:matches)
  endfunction

  call fzf#run(fzf#wrap(spec))
2021-06-04 22:07:29 +09:00
Junegunn Choi e086f0b3fe 0.27.2 2021-06-01 17:00:24 +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 0818dbc36a 0.27.1 2021-05-22 13:19:57 +09:00
Junegunn Choi 347c4b2625 Add 'unbind' action
Fix #2486
2021-05-22 13:16:39 +09:00
Junegunn Choi 34f0d4d0c4 [man] Clarification on --select-1 and --exit-0 2021-05-22 09:47:02 +09:00
Junegunn Choi cbedb57511 [vim] Workaround for Neovim bug of unconditionally evaluating unlet $ENV_VAR
See #2495
2021-05-21 13:17:19 +09:00
Junegunn Choi 9ef825d2fd [vim] Update README-VIM 2021-05-19 18:43:50 +09:00
Junegunn Choi 85ae745910 [vim] Use terminal buffer on 'down' layout on regular Vim on terminal
When 'down' layout was used on regular Vim on terminal, fzf would open
below the editor using `--height` option. This was the only case where
terminal buffer was not used (the code was written when Vim didn't have
builtin terminal) and this exception has been a constant source of
confusion.

This commit makes fzf open in a terminal buffer even in that case.
2021-05-19 18:39:12 +09:00
Junegunn Choi 7411da8d5a [vim] Use FZF_DEFAULT_COMMAND instead of STDIN pipe
So that fzf can finish immediately even when the input process doesn't
handle SIGPIPE and keeps running.

Fix #2481
2021-05-19 18:37:13 +09:00
Junegunn Choi 3f75a8369f Replace RuneWidth to StringWidth to handle grapheme clusters
Fix #2482
2021-05-14 11:44:44 +09:00
Junegunn Choi 4cd621e877 ADVANCED.md: tmux 3.2 is officially released 2021-04-29 09:37:17 +09:00
Junegunn Choi 6e3a2fe0bf [vim] Fix screen offset of relatively positioned popup window
Fix #2461
2021-04-28 10:17:46 +09:00
Junegunn Choi c7c5e7670a Fix goreleaser.yml 2021-04-10 14:19:19 +09:00
Junegunn Choi f6c621ef1b Update ADVANCED.md
Remove unnecessary --color option
2021-04-09 22:58:31 +09:00
Junegunn Choi faf32d451d Update ADVANCED.md 2021-04-09 14:14:53 +09:00
Junegunn Choi 252fd7ecb1 Update ADVANCED.md 2021-04-09 13:43:16 +09:00
Junegunn Choi 7fa89dddb4 Update README.md: Examples page 2021-04-08 10:06:26 +09:00
Junegunn Choi fefdb8c84e Fix typo 2021-04-07 13:28:26 +09:00
Junegunn Choi a6cc05936e ADVANCED.md: Clarification on {q} 2021-04-07 07:12:39 +09:00
Junegunn Choi b209843545 Advanced fzf examples 2021-04-07 06:46:17 +09:00
Junegunn Choi 19759ed36e 0.27.0 2021-04-06 22:53:59 +09:00
Junegunn Choi 1a7ae8e7b9 Update dependencies
go get: upgraded github.com/lucasb-eyer/go-colorful v1.0.3 => v1.2.0
go get: upgraded github.com/mattn/go-runewidth v0.0.9 => v0.0.12
go get: upgraded github.com/mattn/go-shellwords v1.0.10 => v1.0.11
go get: added github.com/rivo/uniseg v0.2.0
go get: upgraded github.com/saracen/walker v0.1.1 => v0.1.2
go get: upgraded golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9 => v0.0.0-20210220032951-036812b2e83c
go get: upgraded golang.org/x/sys v0.0.0-20201119102817-f84b799fce68 => v0.0.0-20210403161142-5e06dd20ab57
go get: upgraded golang.org/x/text v0.3.3 => v0.3.6
2021-04-06 20:32:18 +09:00
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%
2021-04-06 20:10:55 +09:00
Junegunn Choi 3a2015ee26 Fix minimum preview window height 2021-04-06 20:05:54 +09:00
Junegunn Choi c440418ce6 Sign and notarize macOS binaries
Close #2408
2021-04-06 18:09:06 +09:00
Junegunn Choi 3d37a5ba1d Apply preview-bg color to preview border of all shapes 2021-04-06 18:01:29 +09:00
Junegunn Choi 15f4cfb6d9 More border optins for preview window
Close #2431
2021-04-06 17:37:11 +09:00
Junegunn Choi be36de2482 Ignore more ANSI escape sequences
Fix #2420
2021-04-06 00:51:39 +09:00
Junegunn Choi 391237f7df [vim] Compare binary versions
Close #2410
2021-04-06 00:24:20 +09:00
Junegunn Choi 977e5effd9 [vim] Fix paste on MacVim
Close https://github.com/junegunn/fzf.vim/issues/1233
2021-04-05 17:28:18 +09:00
Junegunn Choi 8b36a4cb19 Speed up preview switching when doing partial rendering
Fix #2417
2021-04-04 13:43:16 +09:00
Junegunn Choi 764316a53d Fix flaky test case: test_interrupt_execute
Try to avoid extraneous INT signal
2021-03-26 17:40:12 +09:00
Junegunn Choi f84b3de24b Automatically set /dev/tty as STDIN on execute action
https://github.com/junegunn/fzf/issues/1360#issuecomment-788178140

  # Redirect /dev/tty to suppress "Vim: Warning: Input is not from a terminal"
  ls | fzf --bind "enter:execute(vim {} < /dev/tty)"

  # With this change, we can omit "< /dev/tty" part
  ls | fzf --bind "enter:execute(vim {})"
2021-03-25 20:00:09 +09:00
Junegunn Choi 6a1f3ec08b [install] Download Darwin arm64 binary (#2400 #2401) 2021-03-25 10:56:21 +09:00
Junegunn Choi 1a191ec6f7 Update FUNDING.yml 2021-03-14 12:03:11 +09:00
Junegunn Choi e7171e94b4 Update FUNDING.yml 2021-03-14 12:01:57 +09:00
Junegunn Choi 398d937419 Create FUNDING.yml 2021-03-14 11:59:56 +09:00
Junegunn Choi 34fe5ab143 0.26.0 2021-03-13 15:13:31 +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 b24a2e2fdc Fix regression in preview window rendering 2021-03-12 21:23:16 +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 7310370a31 Fix truncation of colored line when --preview-window wrap is set
Fix #2346
2021-03-12 20:31:27 +09:00
Junegunn Choi 8ae94f0059 Fix premature truncation of colored line when --preview-window wrap is set
Fix #2346
2021-03-12 11:05:51 +09:00
Junegunn Choi 8fccf20892 Fix incorrect tab character handling
Fix #2372
2021-03-12 10:08:18 +09:00
Junegunn Choi cbfbb49ab4 [vim] Vim 8.0 compatibility
Fix #2367
2021-03-08 12:56:06 +09:00
Junegunn Choi b82c1693c0 Fix deadlocks 2021-03-08 00:08:10 +09:00