Bash does not recognize Control-R

506 views
Skip to first unread message

Greg Reagle

unread,
Jan 4, 2013, 7:14:19 AM1/4/13
to min...@googlegroups.com
One of the most useful features of Bash, for me, is
reverse-search-history which is bound to Control-R aka ctrl-r aka
"\C-r". This does not work for me in Minix. I am using QEMU on Linux.
Bash seems to completely ignore Control-R. Control-S works fine in
Bash. In Nano, Control-R works fine.

I bound reverse-search-history to Meta-R by putting this in my
~/.inputrc "Meta-r: reverse-search-history" and it works fine as Alt-R.
So I can use reverse-search-history, but why doesn't it work on the
key that my brain is already programmed to use?

By the way, I am running bash after logging in with the default shell,
in case that is relevant.

Thank you.

--
"No data yet," he answered. "It is a capital mistake to theorize before
you have all the evidence. It biases the judgement."
by Arthur Conan Doyle via his character Sherlock Holmes

Antoine LECA

unread,
Jan 4, 2013, 8:58:58 AM1/4/13
to min...@googlegroups.com
Greg Reagle wrote:
> One of the most useful features of Bash, for me, is
> reverse-search-history which is bound to Control-R aka ctrl-r aka
> "\C-r". This does not work for me in Minix. I am using QEMU on Linux.
> Bash seems to completely ignore Control-R. Control-S works fine in
> Bash. In Nano, Control-R works fine.
>
> I bound reverse-search-history to Meta-R by putting this in my
> ~/.inputrc "Meta-r: reverse-search-history" and it works fine as Alt-R.
> So I can use reverse-search-history, but why doesn't it work on the key
> that my brain is already programmed to use?

Does it work if you bind "manually" (in ~/.inputrc) like in
ctrl-r: reverse-search-history

If it does, I would say this is a problem with the way bash is packaged.


Antoine

Greg Reagle

unread,
Jan 4, 2013, 9:09:25 AM1/4/13
to min...@googlegroups.com
On 01/04/2013 08:58 AM, Antoine LECA wrote:
> Greg Reagle wrote:
>> One of the most useful features of Bash, for me, is
>> reverse-search-history which is bound to Control-R aka ctrl-r aka
>> "\C-r". This does not work for me in Minix. I am using QEMU on Linux.
>> Bash seems to completely ignore Control-R. Control-S works fine in
>> Bash. In Nano, Control-R works fine.
>>
>> I bound reverse-search-history to Meta-R by putting this in my
>> ~/.inputrc "Meta-r: reverse-search-history" and it works fine as Alt-R.
>> So I can use reverse-search-history, but why doesn't it work on the key
>> that my brain is already programmed to use?
>
> Does it work if you bind "manually" (in ~/.inputrc) like in
> ctrl-r: reverse-search-history

No. I don't think the problem is with the binding. It's just that bash
doesn't seem to see ctrl-r. For instance typing ctrl-q (quote the
following character) followed by ctrl-r does nothing.

Thanks for the suggestion, I hadn't tried it before you suggested it.

Rose Perrone

unread,
Aug 16, 2014, 1:30:50 PM8/16/14
to min...@googlegroups.com, greg....@umbc.edu
Make sure another application isn't sucking up your ctrl-R shortcut.
Reply all
Reply to author
Forward
0 new messages