cygwinmintty

How do I prevent strange escape chars from appearing on prompt


I am using Cygwin on windows 7 mintty 2.3.6 (x86_64-pc-cygwin)

And randomly a [28~ will appear on my prompt line. Sometimes it even appears while I am in the middle of typing a command. And often it appears even when the terminal window doesn't have focus.

This is really hard to google for, because google just sees the 28. I would appreciate suggestions on how to improve my google-fu to search for the specific sequence.


Solution

  • This can be caused by an application such as Caffeine, which stops your screensaver by pressing a key periodically (like F15 which has ansi sequence \[[28~) . You can stop the program or add an entry in your ~/.inputrc to ignore the sequence. in ~/.inputrc add the line:

    "\e[28~":""

    to remap F15 to nothing in the terminal.