Bash history-search hotkey resets search

When I press Ctrl+R multiple times, rather than going to the next history result, the search resets performing a new search never going further bash. Any idea what other system based files (fresh users have the issue on the system) could be causing this other than /etc/bashrc, /etc/inputrc, and /etc/profile?

Basically pressing Ctrl+R twice looks like this

(reverse-i-search)`test': echo test # First Ctrl+R
echo test # briefly removes the (reverse-i-search)
(reverse-i-search)`': echo test  # Second Ctrl+R

Rather than continuing the search back with

(reverse-i-search)`test': echo test # First Ctrl+R
(reverse-i-search)`test': echo test now  # Second Ctrl+R

No differences between the files mentioned above on a fresh install

This might be a bash bug, though the search looks for ‘test’ (and executes) the most recent command that contains the exact text entered. As such your search for ‘test’ will always return the first such entry encountered.

The previous commands are stored in ~/.bash_history (and the most recent ~/.bash_history-NNNNN.tmp file [which is the one created for the current bash terminal window] )

I’m not sure it’s a bug since it works on a fresh fedora install.

It seems to work properly without any configs ( bash --norc --noprofile ) but as soon as I include the systems rc file it stops working (bash --noprofile --rcfile /etc/bashrc).

Seems to be something in the /etc/profile.d path cause disabling the for block works

I found it. System had an old xe-cli package which used a conflicting Ctrl-rq in it’s bash-completion file.

--- xe-old      2025-05-23 05:09:28.000000000 -0500
+++ xe-new      2026-09-02 13:29:04.744605745 -0500
-bind -x '"\C-rq":"__autocomplete_reqd_params_names"'
+bind -x '"\eq":"__autocomplete_reqd_params_names"'

Why aren’t you using fzf?

It is not ever intended that the user source any of the files in /etc. Initial boot and login runs the appropriate scripts from /etc/profile.d as well as sourcing /etc/profile and /etc/bashrc. Those should never need (and are not intended) to be sourced again.

Yup, that was just reference troubleshooting command for anyone trying to track down anything similar. Start bash with system’s bashrc only, bypassing any user configs establishing a baseline. Then reference a copy with modifications to help narrow down where the issue is being pulled in. Saves a lot of time not having constantly having to sign in and out. No one actually uses that command during normal use.

Personal preference. fzf got in my way more often then it actually helped. It’s also one less package/config to worry about when bash history-search works just works for me.