18

Before, I could hit Control-R in GNOME Terminal to enter Bash's (reverse-i-search) mode.

However, this stopped working, the cursor just flashes without doing anything. This also affects remote and container shells (where it was working before).

Although I've noticed, it works when I'm pressing: Control-Shift-R.

I'm using GNU bash v4.4.19 on GNOME Terminal v3.30.1. I'm not sure if this is some new feature of Ubuntu Cosmic, or something else.

It seems, this also affects web-browsers, where I've to press Control-Shift-R to refresh the page, and Control-R doesn't take any effect (Chrome and Opera).

My keyboard works fine, I don't have Caps Lock enabled, and I'm not using any custom programs to modify the default shortcuts and I've never changed any. The issue is reproducible all the time, I've tried this already over hundred of times, the same effect.

How do I change the shortcut back to previous default combination (Control-R)?


What I've tried:

  • Reset All Keyboard Shortcuts to default in Ubuntu Settings.

Here are few details:

$ bind -p | grep 'search-history'
"\C-s": forward-search-history
# non-incremental-forward-search-history (not bound)
# non-incremental-forward-search-history-again (not bound)
# non-incremental-reverse-search-history (not bound)
# non-incremental-reverse-search-history-again (not bound)
"\C-r": reverse-search-history

I've checked, and I don't override the above bindings in my dotfiles:

$ grep -r reverse-search-history ~/.bash*
(nothing)
kenorb
  • 10,944

5 Answers5

53

I had this problem and realised I had SimpleScreenRecorder running which was capturing the CTRL+R hotkey. Hope this helps any googlers!

4

If someone is experiencing the same problem, check if you have fzf installed. It binds the Control+R to use the fuzzy finder.

First, make sure it's in your $PATH by running fzf from a terminal. If it's not in the path, Control+R will silently fail.

If it's there, make sure to upgrade it to the latest version.

CTRL-R - Paste the selected command from history onto the command-line

  • If you want to see the commands in chronological order, press CTRL-R again which toggles sorting by relevance.

I was using fzf version 0.18.0 with Ubuntu 18.04.4 and the reverse search was broken. Upgrading fzf to the latest version available (0.21.1) and executing the install script again solved for me.

0

For me it would always happen when a Cisco WebEx reminder on the side of my screen was showing. It wasn't the active screen but sure enough when I close the reminder Cntl-R and other keys begin working again. Took me a bit to connect the two problems together.

Howard
  • 11
0

I face this issue from time to time when using zsh with oh-my-zsh package and tmux.

Current workaround for me is to apply: bindkey '^R' history-incremental-search-backward in given pane.

Igor Golovin
  • 201
  • 2
  • 2
0

For me it was the AOC I-Menu blocking it. Have to close the program and reopen it every time when I want to adjust my screen brightness...

MichalH
  • 251