As per the title, when I press Ctrl+L it just simulates a return carriage and returns me to the prompt.

  • Works for me. Are you using a recent Cygwin version? What shell are you using (i.e. the default bash or something else)? – ak2 Jan 19 '12 at 12:06
  • I just reinstalled cygwin from scratch with the same problem. I'm going to reinstall Console2. – wulfgarpro Jan 20 '12 at 3:50
  • Also just reinstalled Console2 and wiped all settings. Same deal - Ctrl+L just does a carriage return. – wulfgarpro Jan 20 '12 at 4:02
  • Hm - could this have to do with my running on Windows 7 x64? – wulfgarpro Jan 23 '12 at 22:48
  • Does the clear command clear the screen? What does clear | cat -A print? What is your $TERM environment variable set to? – Keith Thompson Jan 24 '12 at 1:39

The problem is the $TERM setting. For the Cygwin console, this should be set to cygwin, and it's the same for Console2, which is a wrapper around the console window.

Something must have set TERM to dumb in the system-wide settings. Perhaps some other Unix toolkit?

  • I added the export to my .bashrc and all was solved. Not sure what changed it. – wulfgarpro Jan 24 '12 at 22:44
  • Fantastic been bugging me for months. – Kevvvvyp May 11 '15 at 13:16

That's because you've told it to do this.

You've …

  • … switched out of emacs mode into vi mode with
    set -o vi
    ; or
  • … reprogrammed Ctrl+L with
    bind '"\C-l": something'
    ; or
  • you've done something in Console2 to remap the key there.

So simply undo that. Switch the readline mode back or re-bind the key to clear-screen.

  • set -o shows emacs on, vi off; I've never used the bind command. I executed the following: bind '"\C-l": clear-screen', and I'm getting the same behavior. – wulfgarpro Jan 19 '12 at 22:53

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.