m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-19 17:13:42 -05:00

feat: Allow disabling Ctrl-R binding in shell integration (#4535)

Close #4417
This commit is contained in:
Jacobo de Vera
2025-10-11 17:57:31 +01:00
committed by GitHub
parent ab407c4645
commit 0e9026b817
5 changed files with 56 additions and 18 deletions

View File

@@ -27,6 +27,7 @@ This version introduces many new features centered around the new "raw" mode.
| Enhancement | Key | `CTRL-N` | `down` -> `down-match` |
| Enhancement | Key | `CTRL-P` | `up` -> `up-match` |
| Enhancement | Shell | `CTRL-R` binding | Toggle raw mode with `ALT-R` |
| Enhancement | Shell | `CTRL-R` binding | Opt-out with an empty `FZF_CTRL_R_COMMAND` |
### Introducing "raw" mode
@@ -231,6 +232,17 @@ As described above, `$FZF_RAW` is now exported to child processes in raw mode,
indicating whether the current item is a match (`1`) or not (`0`). It is not
defined when not in raw mode.
#### `$FZF_CTRL_R_COMMAND`
You can opt-out `CTRL-R` binding from the shell integration by setting
`FZF_CTRL_R_COMMAND` to an empty string. Setting it to any other value is not
supported and will result in a warning.
```sh
# Disable the CTRL-R binding from the shell integration
FZF_CTRL_R_COMMAND= eval "$(fzf --bash)"
```
### Added key support for `--bind`
Pull request #3996 added support for many additional keys for `--bind` option,