parent
244675cab1
commit
92d4ed397b
@ -45,6 +45,12 @@ function Interface(input, output, completer) {
|
|||||||
}
|
}
|
||||||
EventEmitter.call(this);
|
EventEmitter.call(this);
|
||||||
|
|
||||||
|
completer = completer || function() { return []; };
|
||||||
|
|
||||||
|
if (typeof completer !== 'function') {
|
||||||
|
throw new TypeError("Argument 'completer' must be a function");
|
||||||
|
}
|
||||||
|
|
||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
this.output = output;
|
this.output = output;
|
||||||
@ -605,9 +611,7 @@ Interface.prototype._ttyWrite = function(s, key) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'tab': // tab completion
|
case 'tab': // tab completion
|
||||||
if (this.completer) {
|
|
||||||
this._tabComplete();
|
this._tabComplete();
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'left':
|
case 'left':
|
||||||
|
Loading…
x
Reference in New Issue
Block a user