Skip to content

ShellAutocomplete

Category: UI

Source: shell_autocomplete.dart

Classes

ShellAutocomplete

Controls shell mode tab-completion overlay state.

Implements [AutocompleteOverlay]. Unlike slash/@-file overlays, this one activates only on explicit Tab press via [requestCompletions] (async, because it shells out to fish complete -C / compgen).

Constructor

dart
ShellAutocomplete(this._completer)

Properties

PropertyTypeDescription
maxVisibleconst
activebool get
selectedint get
matchCountint get
tokenStartint getThe start position of the completable token in the buffer.
activebool get
selectedint get
matchCountint get
tokenStartint getThe start position of the completable token in the buffer.
overlayHeightint get

Methods

void dismiss()
Future<void> requestCompletions(String buffer, int cursor)

Request completions for the current buffer. Called on Tab press.

Returns a Future that resolves when completions are ready. The caller should re-render after awaiting this.

void moveUp()
void moveDown()
AcceptResult? accept(String buffer, int cursor)
List<String> render(int width)

Released under the MIT License.