       rli.cursor = 0
       rli.output.cursorTo 0
       rli.output.clearLine 1
+      # XXX: multiline hack
+      multiline.buffer = multiline.buffer.replace /\n/g, '\uFF00'
       rli.emit 'line', multiline.buffer
       multiline.buffer = ''
     else

  prompt: 'coffee> ',
  eval: (input, context, filename, cb) ->
    try
      return cb null if /^\(\s+\)$/.test input # Empty command
      # TODO: pass in-scope vars and avoid accidentally shadowing them by omitting those declarations
      js = CoffeeScript.compile input, {filename, bare: yes}
      cb null, vm.runInContext js, context, filename
    catch err
      cb err


  multiline =
    enabled: off
    initialPrompt: repl.prompt.replace(/^[^> ]*/, (x) -> x.replace /./g, '-')
    prompt: repl.prompt.replace(/^[^> ]*>?/, (x) -> x.replace /./g, '.')
    buffer: ''

  # Proxy node's line listener
