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

  • My crystal ball says the "ena" is the beginning of "enable". Remember that there's also .profile which is read on startup. What happens if you run bash --noprofile --norc from zsh? – Ulrich Schwarz Aug 3 '17 at 12:44
  • It also gives the same error. However I discovered something else (see EDIT) – Niteraleph Aug 3 '17 at 12:55
  • 6
    Maybe a ~/.inputrc (or /etc/inputrc) file has something in it that might be causing this? – mtklr Aug 3 '17 at 12:59

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!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.