Functions

f
complete(
server: REPLServer,
names: CompletionCache,
line: string,
callback: CompleterCallback,
cwd?: string
): void

What TAB offers: dot commands on a line that starts with one, page identifiers everywhere else.

f
completionCache(session: ReplSession): CompletionCache

Opens a cache over one session's completions, kept between keystrokes and refreshed behind them.

f
mutedSuggestionStyle(): string

The terminal escape sequence the GHOST SUGGESTION is drawn in — grey, so it reads as something offered rather than something typed.

f
pathBeingTyped(line: string): string | null

The path being typed on a .cat or .view line, or null on any other line.

f
pathsContinuing(
typed: string,
cwd: string
): string[]

Every path that continues typed, spelled the way it was — directories with a trailing slash.

f
pathSuggestion(
line: string,
cwd: string
): string

What to draw after the cursor on a path line: the rest of the shortest path that continues it.

f
setupSuggestionBehaviors(
server: REPLServer,
names?: CompletionCache,
cwd?: string
): () => string

zsh-style typeahead: the rest of the last matching line, greyed out after the cursor, Ctrl-F to take it.

Interfaces

I
CompletionCache

The page's identifiers, as something a keystroke can read.

Type Aliases

T
CompleterCallback = (
error: null,
result: [string[], string]
) => void

What node:repl hands a completer to answer through: the matches, and the word they finish.