| 699 | } |
| 700 | |
| 701 | async [kTabComplete](lastKeypressWasTab) { |
| 702 | this.pause(); |
| 703 | const string = StringPrototypeSlice(this.line, 0, this.cursor); |
| 704 | let value; |
| 705 | try { |
| 706 | value = await this.completer(string); |
| 707 | } catch (err) { |
| 708 | this[kWriteToOutput](`Tab completion error: ${inspect(err)}`); |
| 709 | return; |
| 710 | } finally { |
| 711 | this.resume(); |
| 712 | } |
| 713 | this[kTabCompleter](lastKeypressWasTab, value); |
| 714 | } |
| 715 | |
| 716 | [kTabCompleter](lastKeypressWasTab, { 0: completions, 1: completeOn }) { |
| 717 | // Result and the text that was completed. |