readline: make ctrl + L clear the screen

This commit is contained in:
Yuan Chuan 2013-06-15 15:48:36 +08:00 committed by Ben Noordhuis
parent 41fc46e52f
commit 18574bfaf1

View File

@ -663,6 +663,12 @@ Interface.prototype._ttyWrite = function(s, key) {
this._moveCursor(+1);
break;
case 'l': // clear the whole screen
exports.cursorTo(this.output, 0, 0);
exports.clearScreenDown(this.output);
this._refreshLine();
break;
case 'n': // next history item
this._historyNext();
break;