2. Pypsi Builtin Commands¶
Pypsi ships with several commands that would be useful for any shell.
-
class
pypsi.commands.echo.EchoCommand(name='echo', topic='shell', brief='print a line of text', **kwargs)[source]¶ Bases:
pypsi.core.CommandPrints text to the screen.
-
class
pypsi.commands.exit.ExitCommand(name='exit', topic='shell', brief='exit the shell', **kwargs)[source]¶ Bases:
pypsi.core.CommandExit the active shell.
-
class
pypsi.commands.help.HelpCommand(name='help', topic='shell', brief='print information on a topic or command', topics=None, vars=None, **kwargs)[source]¶ Bases:
pypsi.core.CommandProvides access to manpage-esque topics and command usage information.
-
class
pypsi.commands.include.IncludeCommand(name='include', topic='shell', brief='execute a script file', **kwargs)[source]¶ Bases:
pypsi.core.CommandExecute a script file. This entails reading each line of the given file and processing it as if it were typed into the shell.
-
class
pypsi.commands.macro.MacroCommand(name='macro', topic='shell', brief='manage registered macros', macros=None, **kwargs)[source]¶ Bases:
pypsi.plugins.block.BlockCommandRecord and execute command macros. Macros can consist of one or more command statements. Macros are comparable to Bash functions. Once a macro has been recorded, a new command is registered in the shell as an instance of a
Macro.This command requires the
pypsi.plugins.block.BlockPluginplugin.
-
class
pypsi.commands.system.SystemCommand(name='system', topic='shell', use_shell=False, **kwargs)[source]¶ Bases:
pypsi.core.CommandExecute a command on the parent shell. This command can be used as the shell’s fallback command.
-
class
pypsi.commands.xargs.XArgsCommand(name='xargs', topic='shell', brief='build and execute command lines from stdin', **kwargs)[source]¶ Bases:
pypsi.core.CommandExecute a command for each line of input from
sys.stdin.