   repl.rli.on 'exit', -> fs.close fd
 
   # Add a command to show the history stack
-  repl.commands['.history'] =
+  repl.commands[historyCommand] =
     help: 'Show command history'
     action: ->
       repl.outputStream.write "#{repl.rli.history[..].reverse().join '\n'}\n"
       repl.displayPrompt()
+
+# Adapt load help inherited from the node REPL
+correctLoadHelp = (repl) ->
+  loadCommand = if repl.commandsWithLeadingDot() then '.load' else 'load'
+  repl.commands[loadCommand].help = 'Load code from a file into this REPL session'
 
 module.exports =
   start: (opts = {}) ->


  fd = fs.openSync filename, 'a'

  repl.rli.addListener 'line', (code) ->
    if code and code.length and code isnt '.history' and lastLine isnt code
      # Save the latest command in the file
      fs.write fd, "#{code}\n"
      lastLine = code

      ]
      js = ast.compile bare: yes, locals: Object.keys(context)
      result = if context is global
        vm.runInThisContext js, filename
      else
        vm.runInContext js, context, filename
      cb null, result
