diff options
| author | Jacobo de Vera <devel@jacobodevera.com> | 2025-10-11 17:57:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-12 01:57:31 +0900 |
| commit | 0e9026b817696baed3ff48be8ecf2b6352586c7b (patch) | |
| tree | 632a5c18766b602cfc85e3c64f8153af4f6f1a57 /shell/key-bindings.fish | |
| parent | ab407c4645952d09c4bb9b481b178717f0a0578f (diff) | |
| download | fzf-0e9026b817696baed3ff48be8ecf2b6352586c7b.tar.gz | |
feat: Allow disabling Ctrl-R binding in shell integration (#4535)
Close #4417
Diffstat (limited to 'shell/key-bindings.fish')
| -rw-r--r-- | shell/key-bindings.fish | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish index 1bebaf30..2b44dfd0 100644 --- a/shell/key-bindings.fish +++ b/shell/key-bindings.fish @@ -7,6 +7,7 @@ # - $FZF_TMUX_OPTS # - $FZF_CTRL_T_COMMAND # - $FZF_CTRL_T_OPTS +# - $FZF_CTRL_R_COMMAND # - $FZF_CTRL_R_OPTS # - $FZF_ALT_C_COMMAND # - $FZF_ALT_C_OPTS @@ -214,8 +215,13 @@ function fzf_key_bindings commandline -f repaint end - bind \cr fzf-history-widget - bind -M insert \cr fzf-history-widget + if not set -q FZF_CTRL_R_COMMAND; or test -n "$FZF_CTRL_R_COMMAND" + if test -n "$FZF_CTRL_R_COMMAND" + echo "warning: FZF_CTRL_R_COMMAND is set to a custom command, but custom commands are not yet supported for CTRL-R" >&2 + end + bind \cr fzf-history-widget + bind -M insert \cr fzf-history-widget + end if not set -q FZF_CTRL_T_COMMAND; or test -n "$FZF_CTRL_T_COMMAND" bind \ct fzf-file-widget |
