Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- repl.defineCommand('search', {
- help: 'search through repl history',
- action: function(cmd) {
- if (this.rli.history) this.outputStream.write(this.rli.history.filter(function(line,n) {return n && -1 !== line.indexOf(cmd)}).reverse().join("\n")+"\n");
- this.displayPrompt();
- }
- });
Add Comment
Please, Sign In to add comment