title: Custom REPL in nodejs
body: <p>I'm trying to play with the nodejs built in REPL from the documentation.</p>
  
  <p><a href="http://nodejs.org/api/repl.html" rel="nofollow">http://nodejs.org/api/repl.html</a></p>
  
  <p>The example of adding an item is as follows: </p>
  
  <p><code>repl.start().context.m = msg;</code></p>
  
  <p>I cant seem to find away to add multiple menus. I've tried doing:</p>
  
  <pre><code>menus = {m = 'hello', f = 'foo'}
  repl.start().context = menus
  </code></pre>
  
  <p>But that doesn't work either. I get:</p>
  
  <pre><code>testREPL&gt; m
  TypeError: needs a 'context' argument.
      at REPLServer.self.eval (repl.js:113:21)
      at Interface.&lt;anonymous&gt; (repl.js:250:12)
      at Interface.EventEmitter.emit (events.js:88:17)
      at Interface._onLine (readline.js:199:10)
      at Interface._normalWrite._line_buffer (readline.js:308:12)
      at Array.forEach (native)
      at Interface._normalWrite (readline.js:307:11)
      at Socket.ondata (readline.js:90:10)
      at Socket.EventEmitter.emit (events.js:115:20)
      at TCP.onread (net.js:395:14)
  </code></pre>
  
  <p>Does anybody know how to get this working?</p>