Shell Command Prompt (xonsh.shell)

The xonsh shell

class xonsh.shell.Shell(completekey='tab', stdin=None, stdout=None, ctx=None)[source]

The xonsh shell.

columnize(list, displaywidth=80)

Display a list of strings as a compact set of columns.

Each column is only as wide as necessary. Columns are separated by two spaces (one was not legible enough).

complete(text, state)

Return the next possible completion for ‘text’.

If a command has not been entered, then complete against command list. Otherwise try to call complete_<command> to get list of completions.

completedefault(text, line, begidx, endidx)[source]

Implements tab-completion for text.

completenames(text, line, begidx, endidx)

Implements tab-completion for text.

default(line)[source]

Implements code execution.

do_help(arg)

List available commands with “help” or detailed help with “help cmd”.

emptyline()[source]

Called when an empty line has been entered.

onecmd(line)

Interpret the argument as though it had been typed in response to the prompt.

This may be overridden, but should not normally need to be; see the precmd() and postcmd() methods for useful execution hooks. The return value is a flag indicating whether interpretation of commands by the interpreter should stop.

parseline(line)[source]

Overridden to no-op.

postcmd(stop, line)

Hook method executed just after a command dispatch is finished.

postloop()

Hook method executed once when the cmdloop() method is about to return.

precmd(line)

Hook method executed just before the command line is interpreted, but after the input prompt is generated and issued.

preloop()

Hook method executed once when the cmdloop() method is called.

push(line)[source]

Pushes a line onto the buffer and compiles the code in a way that enables multiline input.

reset_buffer()[source]

Resets the line buffer.

prompt[source]

Obtains the current prompt string.

xonsh.shell.rl_completion_suppress_append(val=1)[source]

Sets the rl_completion_suppress_append varaiable, if possible. A value of 1 (default) means to suppress, a value of 0 means to enable.

xonsh.shell.setup_readline()[source]

Sets up the readline module and completion supression, if available.

xonsh.shell.teardown_readline()[source]

Tears down up the readline module, if available.

This Page