diff --git a/lib/Boris/ReadlineClient.php b/lib/Boris/ReadlineClient.php
index <HASH>..<HASH> 100644
--- a/lib/Boris/ReadlineClient.php
+++ b/lib/Boris/ReadlineClient.php
@@ -7,6 +7,9 @@
  */
 class Boris_ReadlineClient {
   private $_socket;
+  private $_prompt;
+  private $_historyFile;
+  private $_clear = false;
 
   /**
    * Create a new ReadlineClient using $socket for communication.
@@ -30,13 +33,20 @@ class Boris_ReadlineClient {
 
     declare(ticks = 1);
     pcntl_signal(SIGCHLD, SIG_IGN);
+    pcntl_signal(SIGINT, array($this, 'clear'));
 
     $parser = new Boris_ShallowParser();
     $buf = '';
 
     for (;;) {
+      $this->_clear = false;
       $line = readline($buf == '' ? $prompt : str_pad('*> ', strlen($prompt), ' ', STR_PAD_LEFT));
 
+      if ($this->_clear) {
+        $buf = '';
+        continue;
+      }
+
       if (false === $line) {
         $buf = 'exit(0);'; // ctrl-d acts like exit
       }
@@ -65,4 +75,8 @@ class Boris_ReadlineClient {
       }
     }
   }
+
+  public function clear() {
+    $this->_clear = true;
+  }
 }
Clear buffer on ctrl-c... this seems to have a nasty side-effect on the ctrl-d handling though