I was trying out hstr and noticed the recommended way to use it is with bind '"\C-r": "\C-a hstr -- \C-j"'. That works okay, but if you have anything in backticks or any other substitution it will get immediately executed on Ctrl+R, which is probably unexpected...
I guess you could do bind '"\C-r": "\e# history -d -1;hstr -- !!:s^#^^:x\C-j"'
The # should prevent expansion, and then make bash quote it for you...?
I don't know, just a suggestion 😄