Open
Description
- I have read through the manual page (
man fzf
) - I have the latest version of fzf
- I have searched through the existing issues
Info
- OS
- Linux
- Mac OS X
- Windows
- Etc.
- Shell
- bash
- zsh
- fish
Problem / Steps to reproduce
bash ctrl-o
operate-and-get-next
stops working once I source source ~/.fzf.bash
which is auto generated by fzf and replaces the default ctrl-r
by the __fzf_history__
function.
fzf ctrl-r
behavior
bash --noprofile --norc
source ~/.fzf.bash
export FZF_CTRL_R_OPTS="--bind=ctrl-o:accept"
, I don't see anaccept-and-execute
event, andexecute(...)
isn't what I want either.cd ~
ls
- press
ctrl-r
- find
cd ~
command - press
ctrl-o
, notice fzf exits and command line is populated withcd ~
, but no execution happens. - press
ctrl-o
again, notice it executescd ~
, then populatescd ~
again.
for comparison, here is vanilla bash ctrl-r
behavior
bash --noprofile --norc
cd ~
ls
- press
ctrl-r
- find
cd ~
command - press
ctrl-o
, notice the history search exits and the command is executed, andls
is auto populated, ready for execution. - press
ctrl-o
will executels
and further chain up remaining next commands, eventualy giving a walking through previous sequence effect. this works even when I modify the commands (except the first one found in history which has to be executed as is byctrl-o
).
is there anyway to keep bash original ctrl-o
behavior? I do like fzf to search history, but the ctrl-o
auto sequencing behavior is very useful, e.g., in edit-compile-run cycles. thanks.
for reference, here is some explanation about bash behavior, I found it on http://web.mit.edu/gnu/doc/html/features_7.html
operate-and-get-next (C-o)
Accept the current line for execution and fetch the next line relative to the current line from the history for editing. Any argument is ignored.