Ruby - Hide "^C" on Interrupt
I've found that in my Python programs on Linux and Mac OS X terminals I can hide the ^C by starting the message with a carriage return (\r). It feels like a hack but it works just fine.
Whether control characters are echoed is a property of the tty you're using. stty -echoctl
is the Unix way to disable echoing of control characters. You can run this command from within your Ruby script and achieve the same effect if you're using a Unix-ish system.