(options)
| 382 | } |
| 383 | |
| 384 | setupHistoryManager(options) { |
| 385 | this.historyManager = new ReplHistory(this, options); |
| 386 | |
| 387 | if (options.onHistoryFileLoaded) { |
| 388 | this.historyManager.initialize(options.onHistoryFileLoaded); |
| 389 | } |
| 390 | |
| 391 | ObjectDefineProperty(this, 'history', { |
| 392 | __proto__: null, configurable: true, enumerable: true, |
| 393 | get() { return this.historyManager.history; }, |
| 394 | set(newHistory) { return this.historyManager.history = newHistory; }, |
| 395 | }); |
| 396 | |
| 397 | ObjectDefineProperty(this, 'historyIndex', { |
| 398 | __proto__: null, configurable: true, enumerable: true, |
| 399 | get() { return this.historyManager.index; }, |
| 400 | set(historyIndex) { return this.historyManager.index = historyIndex; }, |
| 401 | }); |
| 402 | |
| 403 | ObjectDefineProperty(this, 'historySize', { |
| 404 | __proto__: null, configurable: true, enumerable: true, |
| 405 | get() { return this.historyManager.size; }, |
| 406 | }); |
| 407 | |
| 408 | ObjectDefineProperty(this, 'isFlushing', { |
| 409 | __proto__: null, configurable: true, enumerable: true, |
| 410 | get() { return this.historyManager.isFlushing; }, |
| 411 | }); |
| 412 | } |
| 413 | |
| 414 | [kSetRawMode](mode) { |
| 415 | const wasInRawMode = this.input.isRaw; |
no test coverage detected