An optional function used for Tab autocompletion.
interface
readline.promises.ReadLineOptions
interface ReadLineOptions
- crlfDelay?: number
If the delay between
\rand
exceedscrlfDelaymilliseconds, both\rand
will be treated as separate end-of-line input.crlfDelaywill be coerced to a number no less than100. It can be set toInfinity, in which case\rfollowed by
will always be considered a single newline (which may be reasonable for reading files with\r
line delimiter). - escapeCodeTimeout?: number
The duration
readlinewill wait for a character (when reading an ambiguous key sequence in milliseconds one that can both form a complete key sequence using the input read so far and can take additional input to complete a longer key sequence). - history?: string[]
Initial list of history lines. This option makes sense only if
terminalis set totrueby the user or by an internaloutputcheck, otherwise the history caching mechanism is not initialized at all. - historySize?: number
Maximum number of history lines retained. To disable the history set this value to
0. This option makes sense only ifterminalis set totrueby the user or by an internaloutputcheck, otherwise the history caching mechanism is not initialized at all. - removeHistoryDuplicates?: boolean
If
true, when a new input line added to the history list duplicates an older one, this removes the older line from the list. - signal?: AbortSignal
Allows closing the interface using an AbortSignal. Aborting the signal will internally call
closeon the interface. - terminal?: boolean
trueif theinputandoutputstreams should be treated like a TTY, and have ANSI/VT100 escape codes written to it. Default: checkingisTTYon theoutputstream upon instantiation.