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.

bash_complete(prefix, line, begidx, endidx)[source]

Attempts BASH completion.

cmd_complete(cmd)[source]

Completes a command name based on what is on the $PATH

complete(prefix, line, begidx, endidx, ctx=None)[source]

Complete the string s, 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.

path_complete(prefix)[source]

Completes based on a path name.

This Page