Bash Zsh – Bash Throws ‘set-ena’ When Pressing ‘b’ in Terminal

bashbashrcsetzsh

I have an extremely weird error:
when I write the letter b in my terminal, bash immediately starts to write/throw endless stream of "set-enaset-enaset-enaset-enaset-enaset-ena…" until I force it to stop, by Ctrl-C, or exiting bash. I have removed my .bashrc and replaced it with a default one, but it didn't help. I have also purged bash, and reinstalled it, and also it did not help. Interestingly, when I use my zsh in the same terminal, it works without this error. When I use bash not in the terminal programme, but simply in ubuntu text-mode (console) the error also happens.

When I copy-paste the letter b it also happens. I should note, that it's not required to write b and press enter, the stream of "set-enaset-ena…" starts even before I am able to press enter.

EDIT: I disovered that when I enter the command: set -o vi manually then it's not broken anymore (until I enter set -o emacs. However, when I tried to put set -o vi into my .bashrc, then it didn't work, and actually I had to switch to emacs mode this time for it to work.
Strangely, changing the mode manually, from whatever it was before to something else fixes this weird problem

Best Answer

Thanks to mtklr for help!! I checked my /etc/inputrc file and found out that I had a line that said: bind 'set enable-bracketed-paste on' which caused the error. I assume the b from bind caused the trouble. I guess the proper script would not include the bind command. Thanks everyone for help!

Related Question