command_chain module

inside_dir(dirpath)[source][source]

Context manager that executes code from inside the given directory.

Parameters

dirpath – String, path of the directory the command is being run.

run_inside_dir(command, dirpath)[source][source]

Run a command from inside a given directory, returning the exit status.

Parameters
  • command – Command that will be executed

  • dirpath – String, path of the directory the command is being run.

check_output_inside_dir(command, dirpath)[source][source]

Run a command from inside a given directory, returning the command output.

Parameters
  • command – Command that will be executed

  • dirpath – String, path of the directory the command is being run.

class Executable(command)[source][source]

Bases: contextlib.ContextDecorator

An object representing some executable on a user computer.

__init__(command)[source][source]

Initialize with command.

is_tmux()[source][source]

Check if we’re using tmux or not.

is_rg()[source][source]

Returns the path to rg.

class CommandChainDispatcherRepr(shell=None, chain=None, level=6, *args, **kwargs)[source][source]

Bases: IPython.utils.ipstruct.Struct

Subclass IPython’s Struct to allow for more functionality.

Refer to the superclass for most methods.
Simply, all I've done here is to remove the double underscore from most
methods to improve visibility.
__init__(shell=None, chain=None, level=6, *args, **kwargs)[source][source]

Initialize the class.

Parameters
shell[source]

A trait whose value must be an instance of a specified class.

The value can also be an instance of a subclass of the specified class.

Subclasses can declare default classes by overriding the klass attribute

add(other)[source][source]
iadd(other)[source][source]