MCPcopy Index your code
hub / github.com/nodejs/node / [kTabComplete]

Method [kTabComplete]

lib/internal/readline/interface.js:701–714  ·  view source on GitHub ↗
(lastKeypressWasTab)

Source from the content-addressed store, hash-verified

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.

Callers

nothing calls this directly

Calls 4

pauseMethod · 0.95
resumeMethod · 0.95
completerMethod · 0.80
inspectFunction · 0.50

Tested by

no test coverage detected