cmd

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2026 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Overview

Package cmd wraps os/exec behind the Executor interface so callers that shell out (git operations, tmux calls, the claude command lookup) can be unit-tested against a fake executor without spawning real subprocesses.

The production implementation is [RealExecutor]; tests supply a mock that records invocations and returns scripted output. This is the canonical way to introduce a new shell-out in Loom — reach for this interface before calling exec.Command directly.

Index

Constants

This section is empty.

Variables

View Source
var WorkspaceCmd = &cobra.Command{
	Use:   "workspace",
	Short: "Manage workspaces",
}

WorkspaceCmd is the parent command for workspace management.

Functions

func ToString

func ToString(cmd *exec.Cmd) string

ToString renders a command for logs in "argv joined by spaces" form.

Types

type Exec

type Exec = internalexec.Default

Exec is the production implementation, aliased from internal/exec.Default.

type Executor

type Executor = internalexec.Executor

Executor is re-exported from internal/exec so session/git and cmd share the same interface without either importing the other (cmd imports session/git already).

func MakeExecutor

func MakeExecutor() Executor

MakeExecutor returns a production Executor.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL