You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When executing the command below and pressing ⌃ Control + Y, I observe a different result since commit 6b4358f (Ref: #3810).
# Current situation with 'devel' branch
seq 10 | fzf --bind 'ctrl-y:toggle+down' --expect 'ctrl-y' --bind 'load:pos:4'# ctrl-y# 3
# Old behavior prior to 6b4358f
seq 10 | fzf --bind 'ctrl-y:toggle+down' --expect 'ctrl-y' --bind 'load:pos:4'# ctrl-y# 4
This seems like a breaking change. If a user has set some custom configuration in their FZF_DEFAULT_OPTS and runs a script where a user uses this keybind with --expect, it will cause unintended issues.
Background Info
In my situation, I had a list of PRs and set ctrl-y in my FZF_DEFAULT_OPTS to perform a toggle-down operation. In the script, the ctrl-y key was configured with --expect to checkout the selected PR. This has led to the wrong PR being checked out every time.
Unsetting FZF_DEFAULT_OPTS in the script serves as a solution, however, it results in the loss of numerous custom configurations set by the user. What is the best course of action here ?
The text was updated successfully, but these errors were encountered:
--expect hasn't been compatible with --bind for a very long time, so while if it's conceptually right to make them compatible, some users may have come to rely on the current behavior.
So since we have the new print(...) action, how about if we
Officially declare that --expect is not compatible with --bind, and that it supersedes --bind for the same key when both are used. (Or maybe we can take "last one wins" strategy, e.g. --expect ctrl-y --bind ctrl-y:up)
And suggest using print(...) when they need to combine the two.
While I find it logically sound to have expect compatible with bind, I sympathize with the will to avoid breaking changes, especially for behaviors that have been relied upon for a long time, whatever you decide will be lovingly accepted.
Checklist
man fzf
)Output of
fzf --version
0.52.1 (7aa88aa)
OS
Shell
Problem / Steps to reproduce
Issue
When executing the command below and pressing ⌃ Control + Y, I observe a different result since commit 6b4358f (Ref: #3810).
This seems like a breaking change. If a user has set some custom configuration in their
FZF_DEFAULT_OPTS
and runs a script where a user uses this keybind with--expect
, it will cause unintended issues.Background Info
In my situation, I had a list of PRs and set
ctrl-y
in myFZF_DEFAULT_OPTS
to perform a toggle-down operation. In the script, thectrl-y
key was configured with--expect
to checkout the selected PR. This has led to the wrong PR being checked out every time.Unsetting
FZF_DEFAULT_OPTS
in the script serves as a solution, however, it results in the loss of numerous custom configurations set by the user. What is the best course of action here ?The text was updated successfully, but these errors were encountered: