Completion Tools (xonsh.completers.tools)

class xonsh.completers.tools.RichCompletion(value, *args, **kwargs)[source]

A rich completion that completers can return instead of a string

Parameters
value :

The completion’s actual value.

prefix_len :

Length of the prefix to be replaced in the completion. If None, the default prefix len will be used.

display :

Text to display in completion option list instead of value. NOTE: If supplied, the common prefix with other completions won’t be removed.

description :

Extra text to display when the completion is selected.

style :

Style to pass to prompt-toolkit’s Completion object.

append_closing_quote :

Whether to append a closing quote to the completion if the cursor is after it. See Completer.complete in xonsh/completer.py

append_space :

Whether to append a space after the completion. This is intended to work with appending_closing_quote, so the space will be added correctly after the closing quote. This is used in Completer.complete. An extra bonus is that the space won’t show up in the display attribute.

replace(**kwargs)[source]

Create a new RichCompletion with replaced attributes

property value

Amalgamation of xonsh.completers package, made up of the following modules, in order:

  • bash_completion

  • tools

  • commands

  • completer

  • environment

  • man

  • path

  • pip

  • python

  • xompletions

  • _aliases

  • base

  • bash

  • dirs

  • init