Skip to content
Back to top
View this page
Edit this page

# xonsh.shells.ptk_shell.completer

Completer implementation to use with prompt_toolkit.

class xonsh.shells.ptk_shell.completer.PromptToolkitCompleter(completer, ctx, shell)

  Simple prompt_toolkit Completer object.

  It just redirects requests to normal Xonsh completer.

  Takes instance of xonsh.completer.Completer, the xonsh execution context, and the shell instance itself.

  get_completions(document, complete_event)

    Returns a generator for list of completions.

  async get_completions_async(document: Document, complete_event: CompleteEvent) → AsyncGenerator[Completion, None]

    Asynchronous generator for completions. (Probably, you won’t have to override this.)

    Asynchronous generator of `Completion` objects.

  reserve_space()

    Adjust the height for showing autocompletion menu.

  suggestion_completion(document, line)

    Provides a completion based on the current auto-suggestion.

xonsh.shells.ptk_shell.completer.unquote(completion)