peterh/liner — pull request #28 by raff (2014-11-20 20:30:37+00:00)
Title: catch os.Interrupt (ctrl-C) so that the tty state can be restored

catch os.Interrupt (ctrl-C) so that the tty state can be restored before terminating.

On both OSX and Linux a Ctrl-C kills the application and leaves the tty/terminal window with no echo.
This patch catches os.Interrupt so that the application closes cleanly.

Tested on OSX (Yosemite) and Linux (Centos 5.11)