Module linefeed::complete [] [src]

Provides utilities for implementing word completion

Structs

Completion

Represents a single possible completion

DummyCompleter

Completer type that performs no completion

PathCompleter

Performs completion by searching for filenames matching the word prefix.

Traits

Completer

Performs completion for Reader when triggered by a user input sequence

Functions

complete_path

Returns a sorted list of paths whose prefix matches the given path.

escape

Escapes a word by prefixing a backslash (\\) to non-word characters.

escaped_word_start

Returns the start position of a word with non-word characters escaped by backslash (\\).

unescape

Unescapes a word by removing the backslash (\\) from escaped characters.

word_break_start

Returns the start position of the word that ends at the end of the string.