command

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecContext

type ExecContext struct {
	Stdin          io.Reader
	Stdout, Stderr io.Writer
	Dir            string
	Environ        expand.Environ
	FS             billy.Filesystem
	// Runner is the active shell runner. Commands that need to dispatch a
	// child command (for example, `time CMD`) should call Runner.Subshell()
	// and re-enter the shell so the call goes through the same exec handler
	// chain instead of poking at the registry directly. May be nil in
	// embedders or tests that have not wired up a runner.
	Runner *interp.Runner
}

func (*ExecContext) GuestPWD

func (ec *ExecContext) GuestPWD() string

GuestPWD maps the fsys-relative Dir into the absolute path a WASI guest sees, given the billy filesystem is mounted at "/". Returns "/" when Dir is unset or ".". Used to seed the guest's PWD env var so a guest that honors it (see command/uutils/pwd-hack.patch) resolves relative paths against the shell's current directory rather than the filesystem root.

type Execer

type Execer interface {
	Exec(ctx context.Context, ec *ExecContext, args []string) error
}

Directories

Path Synopsis
internal
du
env
Package env implements the env(1) coreutil: run a program in a modified environment, or print the current environment when no command is given.
Package env implements the env(1) coreutil: run a program in a modified environment, or print the current environment when no command is given.
jo
jq
pwd
qjs
rg
tac

Jump to

Keyboard shortcuts

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