Dumb Shell (xonsh.dumb_shell
)¶
A dumb shell for when $TERM == ‘dumb’, which usually happens in emacs.
-
class
xonsh.dumb_shell.
DumbShell
(*args, **kwargs)[source]¶ A dumb shell for when $TERM == ‘dumb’, which usually happens in emacs.
-
cmdloop
(intro=None)¶ Repeatedly issue a prompt, accept input, parse an initial prefix off the received input, and dispatch to action methods, passing them the remainder of the line as argument.
-
color_style
()¶ Returns the current color map.
-
color_style_names
()¶ Returns an iterable of all available style names.
-
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).
-
compile
(src)¶ Compiles source code and returns the (possibly modified) source and a valid code object.
-
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.
-
complete_help
(*args)¶
-
completedefault
(prefix, line, begidx, endidx)¶ Implements tab-completion for text.
-
completenames
(prefix, line, begidx, endidx)¶ Implements tab-completion for text.
-
default
(line)¶ Implements code execution.
-
do_help
(arg)¶ List available commands with “help” or detailed help with “help cmd”.
-
emptyline
()¶ Called when an empty line has been entered.
-
format_color
(string, hide=False, force_string=False, **kwargs)¶ Readline implementation of color formatting. This uses ANSI color codes.
-
get_names
()¶
-
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)¶ Overridden to no-op.
-
postcmd
(stop, line)¶ Called just before execution of line. For readline, this handles the automatic indentation of code blocks.
-
postloop
()¶ Hook method executed once when the cmdloop() method is about to return.
-
precmd
(line)¶ Called just before execution of line.
-
preloop
()¶ Hook method executed once when the cmdloop() method is called.
-
print_color
(string, hide=False, **kwargs)¶ Prints a string in color. This base implementation’s colors are based on ANSI color codes if a string was given as input. If a list of token pairs is given, it will color based on pygments, if available. If pygments is not available, it will print a colorless string.
-
print_topics
(header, cmds, cmdlen, maxcol)¶
-
push
(line)¶ Pushes a line onto the buffer and compiles the code in a way that enables multiline input.
-
reset_buffer
()¶ Resets the line buffer.
-
restore_tty_sanity
()¶ An interface for resetting the TTY stdin mode. This is highly dependent on the shell backend. Also it is mostly optional since it only affects ^Z backgrounding behaviour.
-
settitle
()¶ Sets terminal title.
-
singleline
(store_in_history=True, **kwargs)¶ Reads a single line of input. The store_in_history kwarg flags whether the input should be stored in readline’s in-memory history.
-
doc_header
= 'Documented commands (type help <topic>):'¶
-
doc_leader
= ''¶
-
identchars
= 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'¶
-
intro
= None¶
-
lastcmd
= ''¶
-
misc_header
= 'Miscellaneous help topics:'¶
-
nohelp
= '*** No help on %s'¶
-
prompt
¶ Obtains the current prompt string.
-
ruler
= '='¶
-
styler
¶
-
undoc_header
= 'Undocumented commands:'¶
-
use_rawinput
= 1¶
-