runscript

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package runscript is the runtime scripts: ~/.agent-vm/runtime.sh and a project's .agent-vm.runtime.sh, run in the VM on every command that enters it, under the shell their shebang names.

Index

Constants

View Source
const ShebangAWK = `` /* 332-byte string literal not displayed */

ShebangAWK reads the interpreter a script asks for: bash or sh, zsh otherwise. Only shells: the script is fed on stdin, read with -s. The program is the shebang's first word ("#!/bin/bash -e"), or after env, its options and assignments ("#!/usr/bin/env -S bash -e"). The VM runs it on a project's script, which only the VM reads: keep it as it is.

View Source
const StripCRAWK = `{ sub(/\r$/, ""); print }`

StripCRAWK drops the CR ending each line, in the VM.

Variables

This section is empty.

Functions

func Interpreter

func Interpreter(content string) string

Interpreter is the shell content's shebang asks for, as ShebangAWK reads it.

func ProjectPath

func ProjectPath(dir string) string

ProjectPath is the project dir's runtime script (see env.ProjectPath).

Types

This section is empty.

Jump to

Keyboard shortcuts

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