readline: make `ctrl + L` clear the screen
This commit is contained in:
Родитель
41fc46e52f
Коммит
18574bfaf1
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче