joyent/node — pull request #7127 by yorkie (2014-02-15 14:39:25+00:00)
Title: repl: add `repl.setPrompt` for dynamic repl server.

Recently I'm using `repl` to implement a simple cli based on REPL.
I found `repl` module has not a specified way to change the prompt when server is running, but like `npm init` do a better experience of CLI by changing `prompt` to show tips for user, hence that, I think node's official module `repl` should export a function `.setPrompt(prompt)`, that perfects REPL and CLI apps.

demo:
```js
var repl = require('repl');
repl.start({
prompt: 'node > ',
eval: function(cmd, context, filename, callback) {
repl.setPrompt('name > (yorkie) ');
callback(null, null);
}
});
```