Tab Completer (xonsh.completer)¶
A (tab-)completer for xonsh.
-
class
xonsh.completer.Completer[source]¶ This provides a list of optional completions for the xonsh shell.
-
complete(prefix, line, begidx, endidx, ctx=None)[source]¶ Complete the string, given a possible execution context.
Parameters: - prefix : str
The string to match
- line : str
The line that prefix appears on.
- begidx : int
The index in line that prefix starts on.
- endidx : int
The index in line that prefix ends on.
- ctx : Iterable of str (ie dict, set, etc), optional
Names in the current execution context.
Returns: - rtn : list of str
Possible completions of prefix, sorted alphabetically.
- lprefix : int
Length of the prefix to be replaced in the completion.
-