When I try to clear my terminal screen on OSX:

computer@ ~ () $ ^L

And when I hit Enter after that it just shows:

   : command not found

Any ideas on how this happens?

My .bash_profile, .profile, and .bashrc are empty.

  • 1
    try to remap : bind -x '"\C-l": clear' – Raza Jul 7 '14 at 21:19
  • That worked, however I'm curious of how it came unbound. – Adam Jul 7 '14 at 21:29
  • i am not sure.. should check default value I don't know where they defined.. – Raza Jul 7 '14 at 21:45

remap control :

bind -x '"\C-l": clear'

  • This works in the session, but the problem always comes back in the next session. How can I make this persistent? EDIT: Phillppe's answer below worked. :) – SamAndrew81 Oct 4 at 17:28

I typically have a ~/.inputrc where I put following bindings

  • 1
    +1 for the .inputrc solution. – helix Mar 27 at 5:02
  • Best answer here - it is persistent. – SamAndrew81 Oct 4 at 17:29

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.