Command Activity (rever.activities.command)

rever.activities.command.command(name, command, undo_command=None, requires=None, **kwargs)

Create a command activity

Parameters
namestr

The name of the activity. Should be unique.

commandstr

The command to be run. Should be a valid xonsh command.

undo_commandstr, optional

Command to undo the activity. Should be a valid xonsh command.

requiresdict or None, optional

The requirements for this command.

Examples

from rever.activities.command import command

command('mycommand', '<command to run>', '<command to undo>')

$ACTIVITIES = ['mycommand']
class rever.activities.command.Command(name, command, undo_command=None, requires=None, **kwargs)

Runs a command

Optionally, an undo command can also be given to undo the given command

Note

The recommended way to create a command is with the rever.activities.command.command() function.

Parameters
namestr

The name of the activity. Should be unique.

commandstr

The command to be run. Should be a valid xonsh command.

undo_commandstr, optional

Command to undo the activity. Should be a valid xonsh command.

requiresdict or None, optional

The requirements for this command.