docs: function(err, exit) {
      // Close the terminal
      if(terminal) terminal.close()
  
      // If there was an error throw it before exit
      if(err) throw err
  
      // process.stdin.resume() prevents node from exiting.
      // process.exit() overrides in more cases than stdin.pause() or stdin.end()
      // it also means we don't need to call process.stdin.setRawMode(false)
      if(exit === undefined || exit) {
        process.exit()
      }
      else {
        process.stdin.setRawMode(false)
        process.stdin.end()
      }
    }