Commit Graph

329 Commits

Author SHA1 Message Date
Junegunn Choi
3b944addd4
Allow removing header line with change-header and transform-header
If the new header is an empty string.

  fzf --header loading --bind 'start:reload:sleep 3; ls' --bind 'load:change-header:'
  fzf --header loading --bind 'start:reload:sleep 3; ls' --bind 'load:transform-header:'
2024-06-25 17:14:11 +09:00
Junegunn Choi
8689f5f230
Fix rubocop warning 2024-06-24 17:16:56 +09:00
Junegunn Choi
5b52833785
Do not start the initial reader if 'reload*' is bound to 'start' 2024-06-24 17:05:53 +09:00
Junegunn Choi
c3cc378d89
Allow empty pointer and marker
Close #3879
2024-06-20 01:45:06 +09:00
Junegunn Choi
540632bb9e
Add --info-command for customizing the input text
Close #3866
2024-06-20 00:53:18 +09:00
ismay
144d55a5be
[fish] Merge history before searching (#3852)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-06-12 13:56:20 +09:00
Junegunn Choi
41bcbe342f
Revert "An '--expect' key should execute actions bound to the key"
To be backward compatible.

Close #3829
2024-06-01 13:21:59 +09:00
Junegunn Choi
2f51eb2b41
Different marker for the first and last line of multi-line entries
Can be configured via `--marker-multi-line`
2024-05-27 01:35:05 +09:00
Junegunn Choi
88e78c9193
Update integration test to use named pipes 2024-05-25 12:03:20 +09:00
Junegunn Choi
6b4358f641
An '--expect' key should execute actions bound to the key
Fix #3810
2024-05-22 20:39:09 +09:00
Junegunn Choi
04db44067d
Implement multi-line display of multi-line items 2024-05-20 09:25:30 +09:00
Junegunn Choi
5b204c54f9
Change default pointer and marker character
* Pointer: '▌'
* Marker: '▏'

They will still be set to '>' if `--no-unicode` is given.

Reasons:
* They look okay
* They work better with multi-line items (WIP)
2024-05-19 15:51:32 +09:00
Junegunn Choi
e8405f40fe
Refactor the code so that fzf can be used as a library (#3769) 2024-05-07 01:06:42 +09:00
Junegunn Choi
501577ab28
Fix flaky test case 2024-05-06 13:59:16 +09:00
Junegunn Choi
24ff66d4a9
Fix change-preview reset by change-preview-window
Fix #3770
2024-05-06 09:40:02 +09:00
Junegunn Choi
f6aa28c380
Fix --info inline-right not properly clearing the previous output
(seq 100000; sleep 1) | fzf --info inline-right --bind load:change-query:x
2024-05-03 12:18:34 +09:00
Junegunn Choi
2665580120
Add $FZF_POS environment variable
Close #2175
Close #3753
2024-04-27 18:57:22 +09:00
Junegunn Choi
a4391aeedd
Add --with-shell for shelling out with different command and flags (#3746)
Close #3732
2024-04-27 18:36:37 +09:00
Junegunn Choi
608232568b
Add 'change-multi' action
Close #3754
2024-04-27 17:38:06 +09:00
Junegunn Choi
fddbfe7b0e
Fix 'reload' not terminating closed standard input stream
Fix #3750
2024-04-25 16:49:06 +09:00
Junegunn Choi
f864f8b5f7
Respect $FZF_DEFAULT_OPTS_FILE in key bindings and completion (#3742)
Fix #3740
2024-04-19 22:40:38 +09:00
Junegunn Choi
a4745626dd
Add jump and jump-cancel events
Close #3412

    # Default behavior
    fzf --bind space:jump

    # Same as jump-accept action
    fzf --bind space:jump,jump:accept

    # Accept on jump, abort on cancel
    fzf --bind space:jump,jump:accept,jump-cancel:abort

    # Change header on jump-cancel
    fzf --bind 'space:change-header(Type jump label)+jump,jump-cancel:change-header:Jump cancelled'
2024-04-10 20:17:12 +09:00
Junegunn Choi
8a2df79711
Do not hide separator by default on --info=inline-right|hidden 2024-04-04 00:05:55 +09:00
Junegunn Choi
07f8f70c5b
Fix flaky test case 2024-03-29 16:15:53 +09:00
Matthieu Cneude
f625c5aabe
Add environment variables: FZF_{BORDER,PREVIEW}_LABEL (#3693)
The environment variable get the value of the preview label, even if it
has been updated with an action. It can be useful to track the label of
the preview and be able to switch between previews using only one
binding.

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-03-29 16:14:08 +09:00
Junegunn Choi
8a74976c1f
Add track-current, untrack-current, and toggle-track-current (#3699)
Close #3691
2024-03-28 20:42:01 +09:00
Junegunn Choi
b6bfd4a5cb
Fix typo in comment 2024-03-27 17:36:08 +09:00
Junegunn Choi
008fb9d258
Fix reload and reload-sync behaviors
https://github.com/junegunn/fzf/discussions/3696#discussioncomment-8915593
2024-03-27 17:25:56 +09:00
Eli Barzilay
88f4c16755
Make it possible to disable Ctrl+T / Alt+C / completions (#3678)
This makes it possible to skip one of the above key bindings or
completions by setting a variable to an empty string. For example,

    FZF_CTRL_T_COMMAND= FZF_ALT_C_COMMAND= \
      eval "$(fzf --zsh)"

Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2024-03-17 16:06:48 +09:00
Junegunn Choi
1833670fb9
Add $FZF_DEFAULT_OPTS_FILE (#3618)
For those who prefer to manage default options in a file.
If the file is not found, fzf will exit with an error.

We're not setting a default value for it because:

1. it's hard to find a default value that can be universally agreed upon
2. to avoid fzf having to check for the existence of the file even when it's not used
2024-02-29 09:49:33 +09:00
Junegunn Choi
5e6788c679
Export FZF_* variables to 'reload' process as well 2024-02-19 12:36:14 +09:00
Junegunn Choi
2a1e5a9729
More test fixes for tcell on GitHub Actions 2024-02-01 17:39:18 +09:00
Junegunn Choi
413c66beba
Fix tests for tcell build 2024-02-01 16:25:53 +09:00
Junegunn Choi
250496c953
Add 'result' event that is triggered when the result list is ready
Close #3560
2024-01-07 17:46:21 +09:00
Junegunn Choi
e47dc758c9
Fix focus event not triggered in certain cases 2024-01-07 15:43:17 +09:00
Junegunn Choi
f0fbed6007
Fix RuboCop error 2023-12-27 01:33:34 +09:00
Junegunn Choi
519de7c833
Fix unexpected result of --tiebreak=end
See https://github.com/junegunn/fzf/issues/3255#issuecomment-1869580320
2023-12-26 23:42:14 +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
50f092551b
Lint: RuboCop 2023-12-10 16:04:30 +09:00
Junegunn Choi
c36a64be68
Add accept-or-print-query
Close #3528
2023-12-10 15:59:45 +09:00
Junegunn Choi
29e67d307a
Fix crash when preview window is hidden on focus event 2023-11-17 19:13:37 +09:00
Timofei Bredov
edfdcc8cee
Basic context-aware completion for ssh command (#3424)
Co-authored-by: Junegunn Choi <junegunn.c@gmail.com>
2023-09-18 00:15:04 +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
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
d0b7780239
Add --info=right
Related: #3322
2023-06-11 16:09:15 +09:00
Junegunn Choi
4c70745cc1
Fix bug where preview is not updated after reload when --disabled is set
Fix #3311
2023-05-27 15:51:04 +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
16b0aeda7d
Make sure 'become' process is given a proper tty device 2023-05-21 14:01:27 +09:00
Junegunn Choi
607eacf8c7
Allow unbind(focus)
Fix #3279
2023-05-17 10:58:03 +09:00