this happens to me from time to time: when I am using the Terminal, suddenly the terminal starting to ignore the capital 'B', regular 'b' works fine, other capital letter work fine. other applications in the system (browser, mail, etc) have not problems.

I tried to:

  • restart the Terminal application
  • switch to iTerm
  • switch to guest user and open Terminal there
  • Write a word in other window and Copy/Paste into terminal

all the above failed. next is restarting my machine.

  • Are you saying the problem also occurs with iTerm? “Write a work in other window and Copy/Paste into terminal” Do you mean that you can’t enter a capital B in a text editor? Or do you mean that pasting “B” into Terminal pastes a lower case “b”?
    – Chris Page
    Feb 8 '12 at 9:59
  • I mean that if I open a text editor, writing the word: "Book", copy then paste to the Terminal, it will be pasted as "ook".
    – smintz
    Feb 8 '12 at 10:36
  • Update: when switching to csh instead of bash or sh, The capital B works like charm :-/
    – smintz
    Feb 8 '12 at 10:37
  • Are you ssh'd to another machine when the failure occurs or is this at the shell prompt on OS X? What does "echo $TERM" say?
    – EmmEff
    Feb 8 '12 at 16:58

Ok, The solution was not simple. but I found it in http://www.softpanorama.org/Scripting/Shellorama/inputrc.shtml.

When I ran bind -p i've noticed that I have a line like this per each char:

"A": self-insert

but not for "B". so I've ran:

bind -p > ~/.inputrc

then I've edited the file and added the letter.

Great Success.

  • That’s very strange. You shouldn’t have to add self-insert items for normal characters. What else was in your .inputrc file before you changed it? (bind -p > ~/.inputrc is going to fill your .inputrc with a lot of unnecessary stuff.)
    – Chris Page
    Feb 10 '12 at 16:18
  • I didn't had a ~/.inputrcfile before...
    – smintz
    Feb 10 '12 at 18:26

Also check if you have anything in ~/.inputrc -- this file allows you to customize your key bindings for readline line editing.


Some suggestions:

Look in Terminal preferences to see if a keyboard setting is responsible.

Using another window create a shell script e.g. echo "Book" and run it from bash or sh, does it work?

Or perhaps some setting has got mangled, rename your shell initialisation files so they are not found and log out and back in again, rerun the shell script if necessary. Does the problem persist? If not then look in the files for the errant initialisation.

  • writing a script with echo "Book" worked well, while writing the script I've noticed that the B letter works find in vim, then I tried read and cat, and both worked. only the bash shell is corrupted. I've tried to remove: /etc/profile, /etc/bashrc, ~/.bashrc and ~/.profile. nothing help :-/
    – smintz
    Feb 8 '12 at 14:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .