native

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: May 23, 2026 License: MIT Imports: 59 Imported by: 0

Documentation

Overview

Package native contains the built-in native Go plugins shipped with memsh.

Package native contains the built-in native Go plugins shipped with memsh.

Package native contains the built-in native Go plugins shipped with memsh.

Package native contains the built-in native Go plugins shipped with memsh.

Package native contains the built-in native Go plugins shipped with memsh.

Index

Constants

View Source
const PagerSentinel = "\x00PAGER\x00"

PagerSentinel is written at the very start of `less` stdout when running in pager mode (web terminal / HTTP server). The server strips it and sets pager:true in the JSON response so the browser can render the overlay.

Variables

This section is empty.

Functions

func WithPagerMode

func WithPagerMode(ctx context.Context) context.Context

WithPagerMode returns a context that tells the less/more plugin to emit PagerSentinel output instead of writing raw content. Call this from the HTTP server handler before creating the shell.

Types

type AwkPlugin

type AwkPlugin struct{}

AwkPlugin runs awk programs via the goawk interpreter.

awk '<program>' [file...]
awk -f <progfile> [file...]

func (AwkPlugin) Description

func (AwkPlugin) Description() string

func (AwkPlugin) Name

func (AwkPlugin) Name() string

func (AwkPlugin) Run

func (AwkPlugin) Run(ctx context.Context, args []string) error

func (AwkPlugin) Usage

func (AwkPlugin) Usage() string

type Base64Plugin

type Base64Plugin struct{}

Base64Plugin encodes or decodes base64 data.

base64 [data...]        encode positional args (or stdin when none given)
base64 -d [data...]     decode

func (Base64Plugin) Description

func (Base64Plugin) Description() string

func (Base64Plugin) Name

func (Base64Plugin) Name() string

func (Base64Plugin) Run

func (Base64Plugin) Run(ctx context.Context, args []string) error

func (Base64Plugin) Usage

func (Base64Plugin) Usage() string

type BcPlugin

type BcPlugin struct{}

func (BcPlugin) Description

func (BcPlugin) Description() string

func (BcPlugin) Name

func (BcPlugin) Name() string

func (BcPlugin) Run

func (BcPlugin) Run(ctx context.Context, args []string) error

func (BcPlugin) Usage

func (BcPlugin) Usage() string

type CatPlugin

type CatPlugin struct{}

func (CatPlugin) Description

func (CatPlugin) Description() string

func (CatPlugin) Name

func (CatPlugin) Name() string

func (CatPlugin) Run

func (CatPlugin) Run(ctx context.Context, args []string) error

func (CatPlugin) Usage

func (CatPlugin) Usage() string

type CdPlugin

type CdPlugin struct{}

func (CdPlugin) Description

func (CdPlugin) Description() string

func (CdPlugin) Name

func (CdPlugin) Name() string

func (CdPlugin) Run

func (CdPlugin) Run(ctx context.Context, args []string) error

func (CdPlugin) Usage

func (CdPlugin) Usage() string

type ChecksumPlugin

type ChecksumPlugin struct {
	// contains filtered or unexported fields
}

ChecksumPlugin computes or verifies file checksums.

sha256sum file...
sha256sum -c sums.txt
echo "data" | sha256sum

func MD5Sum

func MD5Sum() ChecksumPlugin

func SHA1Sum

func SHA1Sum() ChecksumPlugin

func SHA224Sum

func SHA224Sum() ChecksumPlugin

func SHA256Sum

func SHA256Sum() ChecksumPlugin

func SHA384Sum

func SHA384Sum() ChecksumPlugin

func SHA512Sum

func SHA512Sum() ChecksumPlugin

func (ChecksumPlugin) Description

func (c ChecksumPlugin) Description() string

func (ChecksumPlugin) Name

func (c ChecksumPlugin) Name() string

func (ChecksumPlugin) Run

func (c ChecksumPlugin) Run(ctx context.Context, args []string) error

func (ChecksumPlugin) Usage

func (c ChecksumPlugin) Usage() string

type ChmodPlugin

type ChmodPlugin struct{}

func (ChmodPlugin) Description

func (ChmodPlugin) Description() string

func (ChmodPlugin) Name

func (ChmodPlugin) Name() string

func (ChmodPlugin) Run

func (ChmodPlugin) Run(ctx context.Context, args []string) error

func (ChmodPlugin) Usage

func (ChmodPlugin) Usage() string

type ClearPlugin

type ClearPlugin struct{}

func (ClearPlugin) Description

func (ClearPlugin) Description() string

func (ClearPlugin) Name

func (ClearPlugin) Name() string

func (ClearPlugin) Run

func (ClearPlugin) Run(ctx context.Context, args []string) error

func (ClearPlugin) Usage

func (ClearPlugin) Usage() string

type ColumnPlugin

type ColumnPlugin struct{}

ColumnPlugin formats input into aligned columns.

column -t              table mode: align whitespace-delimited fields
column -t -s ':'       use ':' as input separator
column -t -o ' | '     use ' | ' as output separator
column -t -n           don't merge adjacent delimiters (treat empty fields as real)
column -c 80           fill-column mode: wrap items into N-wide display
column -x              fill rows before columns (row-major order)
cat /etc/passwd | column -t -s ':'

func (ColumnPlugin) Description

func (ColumnPlugin) Description() string

func (ColumnPlugin) Name

func (ColumnPlugin) Name() string

func (ColumnPlugin) Run

func (ColumnPlugin) Run(ctx context.Context, args []string) error

func (ColumnPlugin) Usage

func (ColumnPlugin) Usage() string

type CpPlugin

type CpPlugin struct{}

func (CpPlugin) Description

func (CpPlugin) Description() string

func (CpPlugin) Name

func (CpPlugin) Name() string

func (CpPlugin) Run

func (CpPlugin) Run(ctx context.Context, args []string) error

func (CpPlugin) Usage

func (CpPlugin) Usage() string

type CrontabPlugin

type CrontabPlugin struct{}

CrontabPlugin implements the `crontab` command against the virtual FS.

crontab -l         print /.crontab, or a "no crontab" message if absent
crontab -r         remove /.crontab silently
crontab <file>     validate and install <file> as /.crontab
crontab            read stdin, validate, and install as /.crontab

func (CrontabPlugin) Description

func (CrontabPlugin) Description() string

func (CrontabPlugin) Name

func (CrontabPlugin) Name() string

func (CrontabPlugin) Run

func (CrontabPlugin) Run(ctx context.Context, args []string) error

func (CrontabPlugin) Usage

func (CrontabPlugin) Usage() string

type CurlPlugin

type CurlPlugin struct{}

CurlPlugin performs HTTP requests, mimicking curl behaviour.

curl [options] <url>
curl -X POST -d '{"k":"v"}' -H 'Content-Type: application/json' https://example.com/api
curl -o /out.html https://example.com
curl -L -s https://example.com | jq .

func (CurlPlugin) Description

func (CurlPlugin) Description() string

func (CurlPlugin) Name

func (CurlPlugin) Name() string

func (CurlPlugin) Run

func (CurlPlugin) Run(ctx context.Context, args []string) error

func (CurlPlugin) Usage

func (CurlPlugin) Usage() string

type CutPlugin

type CutPlugin struct{}

func (CutPlugin) Description

func (CutPlugin) Description() string

func (CutPlugin) Name

func (CutPlugin) Name() string

func (CutPlugin) Run

func (CutPlugin) Run(ctx context.Context, args []string) error

func (CutPlugin) Usage

func (CutPlugin) Usage() string

type DatePlugin

type DatePlugin struct{}

func (DatePlugin) Description

func (DatePlugin) Description() string

func (DatePlugin) Name

func (DatePlugin) Name() string

func (DatePlugin) Run

func (DatePlugin) Run(ctx context.Context, args []string) error

func (DatePlugin) Usage

func (DatePlugin) Usage() string

type DfPlugin

type DfPlugin struct{}

func (DfPlugin) Description

func (DfPlugin) Description() string

func (DfPlugin) Name

func (DfPlugin) Name() string

func (DfPlugin) Run

func (DfPlugin) Run(ctx context.Context, args []string) error

func (DfPlugin) Usage

func (DfPlugin) Usage() string

type DiffPlugin

type DiffPlugin struct{}

func (DiffPlugin) Description

func (DiffPlugin) Description() string

func (DiffPlugin) Name

func (DiffPlugin) Name() string

func (DiffPlugin) Run

func (DiffPlugin) Run(ctx context.Context, args []string) error

func (DiffPlugin) Usage

func (DiffPlugin) Usage() string

type DotPlugin

type DotPlugin struct{}

func (DotPlugin) Description

func (DotPlugin) Description() string

func (DotPlugin) Name

func (DotPlugin) Name() string

func (DotPlugin) Run

func (DotPlugin) Run(ctx context.Context, args []string) error

func (DotPlugin) Usage

func (DotPlugin) Usage() string

type DuPlugin

type DuPlugin struct{}

func (DuPlugin) Description

func (DuPlugin) Description() string

func (DuPlugin) Name

func (DuPlugin) Name() string

func (DuPlugin) Run

func (DuPlugin) Run(ctx context.Context, args []string) error

func (DuPlugin) Usage

func (DuPlugin) Usage() string

type EchoPlugin

type EchoPlugin struct{}

func (EchoPlugin) Description

func (EchoPlugin) Description() string

func (EchoPlugin) Name

func (EchoPlugin) Name() string

func (EchoPlugin) Run

func (EchoPlugin) Run(ctx context.Context, args []string) error

func (EchoPlugin) Usage

func (EchoPlugin) Usage() string

type EnvPlugin

type EnvPlugin struct{}

func (EnvPlugin) Description

func (EnvPlugin) Description() string

func (EnvPlugin) Name

func (EnvPlugin) Name() string

func (EnvPlugin) Run

func (EnvPlugin) Run(ctx context.Context, args []string) error

func (EnvPlugin) Usage

func (EnvPlugin) Usage() string

type EnvsubstPlugin

type EnvsubstPlugin struct{}

EnvsubstPlugin substitutes environment variable references in text.

envsubst                    read stdin, replace all $VAR / ${VAR}
envsubst '$VAR1 $VAR2'      only substitute the listed variables
envsubst < template.txt
cat tmpl.txt | envsubst '$HOME $USER'

func (EnvsubstPlugin) Description

func (EnvsubstPlugin) Description() string

func (EnvsubstPlugin) Name

func (EnvsubstPlugin) Name() string

func (EnvsubstPlugin) Run

func (EnvsubstPlugin) Run(ctx context.Context, args []string) error

func (EnvsubstPlugin) Usage

func (EnvsubstPlugin) Usage() string

type ExitPlugin

type ExitPlugin struct{}

func (ExitPlugin) Description

func (ExitPlugin) Description() string

func (ExitPlugin) Name

func (ExitPlugin) Name() string

func (ExitPlugin) Run

func (ExitPlugin) Run(ctx context.Context, args []string) error

func (ExitPlugin) Usage

func (ExitPlugin) Usage() string

type ExprPlugin

type ExprPlugin struct{}

func (ExprPlugin) Description

func (ExprPlugin) Description() string

func (ExprPlugin) Name

func (ExprPlugin) Name() string

func (ExprPlugin) Run

func (ExprPlugin) Run(ctx context.Context, args []string) error

func (ExprPlugin) Usage

func (ExprPlugin) Usage() string

type FindPlugin

type FindPlugin struct{}

FindPlugin searches the virtual filesystem for files matching criteria.

find [path] [-name <glob>] [-type f|d]

func (FindPlugin) Description

func (FindPlugin) Description() string

func (FindPlugin) Name

func (FindPlugin) Name() string

func (FindPlugin) Run

func (FindPlugin) Run(ctx context.Context, args []string) error

func (FindPlugin) Usage

func (FindPlugin) Usage() string

type GoPlugin added in v0.0.14

type GoPlugin struct{}

GoPlugin emulates the Go toolchain for source files stored in the virtual filesystem, backed by the MVM interpreter.

go run <file.go>                      run a Go source file
go test [./path|./...] [-v] [-run RE] run Test* functions
go fmt  <file.go> [...]               format Go source in place
go version                            print MVM version

func (GoPlugin) Description added in v0.0.14

func (GoPlugin) Description() string

func (GoPlugin) Name added in v0.0.14

func (GoPlugin) Name() string

func (GoPlugin) Run added in v0.0.14

func (GoPlugin) Run(ctx context.Context, args []string) error

func (GoPlugin) Usage added in v0.0.14

func (GoPlugin) Usage() string

type GojaPlugin

type GojaPlugin struct{}

GojaPlugin executes JavaScript code using goja.

goja [-e 'code']        execute inline JavaScript code
goja [file.js]          execute JavaScript file from virtual filesystem
                    (reads JavaScript code from stdin when no args)

func (GojaPlugin) Description

func (GojaPlugin) Description() string

func (GojaPlugin) Name

func (GojaPlugin) Name() string

func (GojaPlugin) Run

func (GojaPlugin) Run(ctx context.Context, args []string) error

func (GojaPlugin) Usage

func (GojaPlugin) Usage() string

type GrepPlugin

type GrepPlugin struct{}

GrepPlugin searches file contents for lines matching a pattern.

grep [-i] [-n] [-v] [-r] <pattern> [file...]   read from files or stdin

func (GrepPlugin) Description

func (GrepPlugin) Description() string

func (GrepPlugin) Name

func (GrepPlugin) Name() string

func (GrepPlugin) Run

func (GrepPlugin) Run(ctx context.Context, args []string) error

func (GrepPlugin) Usage

func (GrepPlugin) Usage() string

type GzipPlugin

type GzipPlugin struct {
	// contains filtered or unexported fields
}

GzipPlugin compresses or decompresses files using gzip.

gzip file           compress → file.gz, remove original
gzip -d file.gz     decompress → file, remove .gz
gzip -k file        keep original
gzip -c file        write to stdout
gzip -l file.gz     list compressed file info
gunzip file.gz      decompress (alias for gzip -d)

func Gunzip

func Gunzip() GzipPlugin

Gunzip returns a plugin registered as "gunzip".

func Gzip

func Gzip() GzipPlugin

Gzip returns a plugin registered as "gzip".

func (GzipPlugin) Description

func (g GzipPlugin) Description() string

func (GzipPlugin) Name

func (g GzipPlugin) Name() string

func (GzipPlugin) Run

func (g GzipPlugin) Run(ctx context.Context, args []string) error

func (GzipPlugin) Usage

func (GzipPlugin) Usage() string

type HeadPlugin

type HeadPlugin struct{}

func (HeadPlugin) Description

func (HeadPlugin) Description() string

func (HeadPlugin) Name

func (HeadPlugin) Name() string

func (HeadPlugin) Run

func (HeadPlugin) Run(ctx context.Context, args []string) error

func (HeadPlugin) Usage

func (HeadPlugin) Usage() string

type HelpPlugin

type HelpPlugin struct{}

func (HelpPlugin) Description

func (HelpPlugin) Description() string

func (HelpPlugin) Name

func (HelpPlugin) Name() string

func (HelpPlugin) Run

func (HelpPlugin) Run(ctx context.Context, args []string) error

func (HelpPlugin) Usage

func (HelpPlugin) Usage() string

type HexdumpPlugin

type HexdumpPlugin struct{}

func (HexdumpPlugin) Description

func (HexdumpPlugin) Description() string

func (HexdumpPlugin) Name

func (HexdumpPlugin) Name() string

func (HexdumpPlugin) Run

func (HexdumpPlugin) Run(ctx context.Context, args []string) error

func (HexdumpPlugin) Usage

func (HexdumpPlugin) Usage() string

type JqPlugin

type JqPlugin struct{}

JqPlugin processes JSON using the gojq library.

jq [options] <expr> [file...]
jq .field data.json
echo '{"a":1}' | jq .a

func (JqPlugin) Description

func (JqPlugin) Description() string

func (JqPlugin) Name

func (JqPlugin) Name() string

func (JqPlugin) Run

func (JqPlugin) Run(ctx context.Context, args []string) error

func (JqPlugin) Usage

func (JqPlugin) Usage() string

type LessPlugin

type LessPlugin struct {
	// contains filtered or unexported fields
}

LessPlugin implements the `less` pager. It reads file arguments (or stdin) and writes PagerSentinel + the full content to stdout so the web terminal can render a scrollable pager overlay.

Most flags that control display behaviour (line numbers, wrapping, colour) are client-side concerns and are silently accepted but ignored here. Flags that affect content selection (+N start line, -N/-n line numbers) are passed through in the sentinel metadata line so the client can act on them.

Sentinel format:

\x00PAGER\x00<JSON metadata>\n<file content>

Metadata JSON fields:

start   int   – 0-based line to start at (from +N argument, default 0)
numbers bool  – whether to show line numbers (-N flag, default true; -n disables)

func Less

func Less() LessPlugin

Less returns a LessPlugin registered as "less".

func More

func More() LessPlugin

More returns a LessPlugin registered as "more".

func (LessPlugin) Description

func (p LessPlugin) Description() string

func (LessPlugin) Name

func (p LessPlugin) Name() string

func (LessPlugin) Run

func (p LessPlugin) Run(ctx context.Context, args []string) error

func (LessPlugin) Usage

func (p LessPlugin) Usage() string

type LnPlugin

type LnPlugin struct{}

func (LnPlugin) Description

func (LnPlugin) Description() string

func (LnPlugin) Name

func (LnPlugin) Name() string

func (LnPlugin) Run

func (LnPlugin) Run(ctx context.Context, args []string) error

func (LnPlugin) Usage

func (LnPlugin) Usage() string

type LsPlugin

type LsPlugin struct{}

func (LsPlugin) Description

func (LsPlugin) Description() string

func (LsPlugin) Name

func (LsPlugin) Name() string

func (LsPlugin) Run

func (LsPlugin) Run(ctx context.Context, args []string) error

func (LsPlugin) Usage

func (LsPlugin) Usage() string

type LuaPlugin

type LuaPlugin struct{}

LuaPlugin executes Lua code using gopher-lua.

lua [-e 'code']        execute inline Lua code
lua [file.lua]         execute Lua file from virtual filesystem
                    (reads Lua code from stdin when no args)

func (LuaPlugin) Description

func (LuaPlugin) Description() string

func (LuaPlugin) Name

func (LuaPlugin) Name() string

func (LuaPlugin) Run

func (LuaPlugin) Run(ctx context.Context, args []string) error

func (LuaPlugin) Usage

func (LuaPlugin) Usage() string

type ManPlugin

type ManPlugin struct{}

func (ManPlugin) Description

func (ManPlugin) Description() string

func (ManPlugin) Name

func (ManPlugin) Name() string

func (ManPlugin) Run

func (ManPlugin) Run(ctx context.Context, args []string) error

func (ManPlugin) Usage

func (ManPlugin) Usage() string

type MkdirPlugin

type MkdirPlugin struct{}

func (MkdirPlugin) Description

func (MkdirPlugin) Description() string

func (MkdirPlugin) Name

func (MkdirPlugin) Name() string

func (MkdirPlugin) Run

func (MkdirPlugin) Run(ctx context.Context, args []string) error

func (MkdirPlugin) Usage

func (MkdirPlugin) Usage() string

type MktempPlugin

type MktempPlugin struct{}

MktempPlugin creates a temporary file or directory in the virtual FS.

mktemp                      /tmp/tmp.XXXXXXXXXX
mktemp -d                   /tmp/tmp.XXXXXXXXXX  (directory)
mktemp -p /var/tmp          use alternate base dir
mktemp --suffix .json       append suffix after substituted Xs
mktemp /tmp/myapp.XXXXXX    custom template
mktemp -u TEMPLATE          dry-run: print name without creating

func (MktempPlugin) Description

func (MktempPlugin) Description() string

func (MktempPlugin) Name

func (MktempPlugin) Name() string

func (MktempPlugin) Run

func (MktempPlugin) Run(ctx context.Context, args []string) error

func (MktempPlugin) Usage

func (MktempPlugin) Usage() string

type MvPlugin

type MvPlugin struct{}

func (MvPlugin) Description

func (MvPlugin) Description() string

func (MvPlugin) Name

func (MvPlugin) Name() string

func (MvPlugin) Run

func (MvPlugin) Run(ctx context.Context, args []string) error

func (MvPlugin) Usage

func (MvPlugin) Usage() string

type PrintenvPlugin

type PrintenvPlugin struct{}

func (PrintenvPlugin) Description

func (PrintenvPlugin) Description() string

func (PrintenvPlugin) Name

func (PrintenvPlugin) Name() string

func (PrintenvPlugin) Run

func (PrintenvPlugin) Run(ctx context.Context, args []string) error

func (PrintenvPlugin) Usage

func (PrintenvPlugin) Usage() string

type PrintfPlugin

type PrintfPlugin struct{}

func (PrintfPlugin) Description

func (PrintfPlugin) Description() string

func (PrintfPlugin) Name

func (PrintfPlugin) Name() string

func (PrintfPlugin) Run

func (PrintfPlugin) Run(ctx context.Context, args []string) error

func (PrintfPlugin) Usage

func (PrintfPlugin) Usage() string

type PwdPlugin

type PwdPlugin struct{}

func (PwdPlugin) Description

func (PwdPlugin) Description() string

func (PwdPlugin) Name

func (PwdPlugin) Name() string

func (PwdPlugin) Run

func (PwdPlugin) Run(ctx context.Context, args []string) error

func (PwdPlugin) Usage

func (PwdPlugin) Usage() string

type QuitPlugin

type QuitPlugin struct{}

func (QuitPlugin) Description

func (QuitPlugin) Description() string

func (QuitPlugin) Name

func (QuitPlugin) Name() string

func (QuitPlugin) Run

func (QuitPlugin) Run(ctx context.Context, args []string) error

func (QuitPlugin) Usage

func (QuitPlugin) Usage() string

type ReadPlugin

type ReadPlugin struct{}

func (ReadPlugin) Description

func (ReadPlugin) Description() string

func (ReadPlugin) Name

func (ReadPlugin) Name() string

func (ReadPlugin) Run

func (ReadPlugin) Run(ctx context.Context, args []string) error

func (ReadPlugin) Usage

func (ReadPlugin) Usage() string

type ResetPlugin

type ResetPlugin struct{}

func (ResetPlugin) Description

func (ResetPlugin) Description() string

func (ResetPlugin) Name

func (ResetPlugin) Name() string

func (ResetPlugin) Run

func (ResetPlugin) Run(ctx context.Context, args []string) error

func (ResetPlugin) Usage

func (ResetPlugin) Usage() string

type RmPlugin

type RmPlugin struct{}

func (RmPlugin) Description

func (RmPlugin) Description() string

func (RmPlugin) Name

func (RmPlugin) Name() string

func (RmPlugin) Run

func (RmPlugin) Run(ctx context.Context, args []string) error

func (RmPlugin) Usage

func (RmPlugin) Usage() string

type RmdirPlugin

type RmdirPlugin struct{}

func (RmdirPlugin) Description

func (RmdirPlugin) Description() string

func (RmdirPlugin) Name

func (RmdirPlugin) Name() string

func (RmdirPlugin) Run

func (RmdirPlugin) Run(ctx context.Context, args []string) error

func (RmdirPlugin) Usage

func (RmdirPlugin) Usage() string

type SQLitePlugin

type SQLitePlugin struct{}

SQLitePlugin implements an sqlite3-like CLI against the virtual filesystem.

sqlite3 [flags] [DBFILE] [SQL...]

DBFILE defaults to ":memory:". When a path is given the database bytes are copied from afero to a temp OS file, operated on, then written back.

func (SQLitePlugin) Description

func (SQLitePlugin) Description() string

func (SQLitePlugin) Name

func (SQLitePlugin) Name() string

func (SQLitePlugin) Run

func (SQLitePlugin) Run(ctx context.Context, args []string) error

func (SQLitePlugin) Usage

func (SQLitePlugin) Usage() string

type SSHPlugin

type SSHPlugin struct{}

SSHPlugin connects to a remote memsh SSH server (started with memsh serve --ssh).

Usage:

ssh [-p password] [-P port] [user@]host[:port] [-- command args...]

Without "--": opens an interactive remote REPL (reads from hc.Stdin). With "--": runs a single command on the remote and returns its output.

The SSH username is used as the remote session ID, so reconnecting with the same username resumes the same virtual filesystem. Use a random username for an isolated session (the server auto-generates one if you use "memsh").

func (SSHPlugin) Description

func (SSHPlugin) Description() string

func (SSHPlugin) Name

func (SSHPlugin) Name() string

func (SSHPlugin) Run

func (SSHPlugin) Run(ctx context.Context, args []string) error

func (SSHPlugin) Usage

func (SSHPlugin) Usage() string

type SedPlugin

type SedPlugin struct{}

func (SedPlugin) Description

func (SedPlugin) Description() string

func (SedPlugin) Name

func (SedPlugin) Name() string

func (SedPlugin) Run

func (SedPlugin) Run(ctx context.Context, args []string) error

func (SedPlugin) Usage

func (SedPlugin) Usage() string

type SeqPlugin

type SeqPlugin struct{}

func (SeqPlugin) Description

func (SeqPlugin) Description() string

func (SeqPlugin) Name

func (SeqPlugin) Name() string

func (SeqPlugin) Run

func (SeqPlugin) Run(ctx context.Context, args []string) error

func (SeqPlugin) Usage

func (SeqPlugin) Usage() string

type SleepPlugin

type SleepPlugin struct{}

func (SleepPlugin) Description

func (SleepPlugin) Description() string

func (SleepPlugin) Name

func (SleepPlugin) Name() string

func (SleepPlugin) Run

func (SleepPlugin) Run(ctx context.Context, args []string) error

func (SleepPlugin) Usage

func (SleepPlugin) Usage() string

type SortPlugin

type SortPlugin struct{}

func (SortPlugin) Description

func (SortPlugin) Description() string

func (SortPlugin) Name

func (SortPlugin) Name() string

func (SortPlugin) Run

func (SortPlugin) Run(ctx context.Context, args []string) error

func (SortPlugin) Usage

func (SortPlugin) Usage() string

type SourcePlugin

type SourcePlugin struct{}

func (SourcePlugin) Description

func (SourcePlugin) Description() string

func (SourcePlugin) Name

func (SourcePlugin) Name() string

func (SourcePlugin) Run

func (SourcePlugin) Run(ctx context.Context, args []string) error

func (SourcePlugin) Usage

func (SourcePlugin) Usage() string

type StatPlugin

type StatPlugin struct{}

func (StatPlugin) Description

func (StatPlugin) Description() string

func (StatPlugin) Name

func (StatPlugin) Name() string

func (StatPlugin) Run

func (StatPlugin) Run(ctx context.Context, args []string) error

func (StatPlugin) Usage

func (StatPlugin) Usage() string

type SttyPlugin

type SttyPlugin struct{}

func (SttyPlugin) Description

func (SttyPlugin) Description() string

func (SttyPlugin) Name

func (SttyPlugin) Name() string

func (SttyPlugin) Run

func (SttyPlugin) Run(ctx context.Context, args []string) error

func (SttyPlugin) Usage

func (SttyPlugin) Usage() string

type TailPlugin

type TailPlugin struct{}

func (TailPlugin) Description

func (TailPlugin) Description() string

func (TailPlugin) Name

func (TailPlugin) Name() string

func (TailPlugin) Run

func (TailPlugin) Run(ctx context.Context, args []string) error

func (TailPlugin) Usage

func (TailPlugin) Usage() string

type TarPlugin

type TarPlugin struct{}

TarPlugin creates and extracts tar archives (optionally gzip/bzip2 compressed).

tar -czf archive.tar.gz file1 file2 dir/
tar -xf archive.tar.gz
tar -xf archive.tar.gz -C /dest
tar -tf archive.tar.gz

func (TarPlugin) Description

func (TarPlugin) Description() string

func (TarPlugin) Name

func (TarPlugin) Name() string

func (TarPlugin) Run

func (TarPlugin) Run(ctx context.Context, args []string) error

func (TarPlugin) Usage

func (TarPlugin) Usage() string

type TeePlugin

type TeePlugin struct{}

func (TeePlugin) Description

func (TeePlugin) Description() string

func (TeePlugin) Name

func (TeePlugin) Name() string

func (TeePlugin) Run

func (TeePlugin) Run(ctx context.Context, args []string) error

func (TeePlugin) Usage

func (TeePlugin) Usage() string

type TimeoutPlugin

type TimeoutPlugin struct{}

func (TimeoutPlugin) Description

func (TimeoutPlugin) Description() string

func (TimeoutPlugin) Name

func (TimeoutPlugin) Name() string

func (TimeoutPlugin) Run

func (TimeoutPlugin) Run(ctx context.Context, args []string) error

func (TimeoutPlugin) Usage

func (TimeoutPlugin) Usage() string

type TouchPlugin

type TouchPlugin struct{}

func (TouchPlugin) Description

func (TouchPlugin) Description() string

func (TouchPlugin) Name

func (TouchPlugin) Name() string

func (TouchPlugin) Run

func (TouchPlugin) Run(ctx context.Context, args []string) error

func (TouchPlugin) Usage

func (TouchPlugin) Usage() string

type TputPlugin

type TputPlugin struct{}

func (TputPlugin) Description

func (TputPlugin) Description() string

func (TputPlugin) Name

func (TputPlugin) Name() string

func (TputPlugin) Run

func (TputPlugin) Run(ctx context.Context, args []string) error

func (TputPlugin) Usage

func (TputPlugin) Usage() string

type TrPlugin

type TrPlugin struct{}

func (TrPlugin) Description

func (TrPlugin) Description() string

func (TrPlugin) Name

func (TrPlugin) Name() string

func (TrPlugin) Run

func (TrPlugin) Run(ctx context.Context, args []string) error

func (TrPlugin) Usage

func (TrPlugin) Usage() string

type UniqPlugin

type UniqPlugin struct{}

func (UniqPlugin) Description

func (UniqPlugin) Description() string

func (UniqPlugin) Name

func (UniqPlugin) Name() string

func (UniqPlugin) Run

func (UniqPlugin) Run(ctx context.Context, args []string) error

func (UniqPlugin) Usage

func (UniqPlugin) Usage() string

type WcPlugin

type WcPlugin struct{}

WcPlugin counts lines, words, and bytes.

wc [-l] [-w] [-c] [file]   read from virtual-FS file or stdin

func (WcPlugin) Description

func (WcPlugin) Description() string

func (WcPlugin) Name

func (WcPlugin) Name() string

func (WcPlugin) Run

func (WcPlugin) Run(ctx context.Context, args []string) error

func (WcPlugin) Usage

func (WcPlugin) Usage() string

type WhichPlugin

type WhichPlugin struct{}

func (WhichPlugin) Description

func (WhichPlugin) Description() string

func (WhichPlugin) Name

func (WhichPlugin) Name() string

func (WhichPlugin) Run

func (WhichPlugin) Run(ctx context.Context, args []string) error

func (WhichPlugin) Usage

func (WhichPlugin) Usage() string

type XargsPlugin

type XargsPlugin struct{}

func (XargsPlugin) Description

func (XargsPlugin) Description() string

func (XargsPlugin) Name

func (XargsPlugin) Name() string

func (XargsPlugin) Run

func (XargsPlugin) Run(ctx context.Context, args []string) error

func (XargsPlugin) Usage

func (XargsPlugin) Usage() string

type XxdPlugin

type XxdPlugin struct{}

func (XxdPlugin) Description

func (XxdPlugin) Description() string

func (XxdPlugin) Name

func (XxdPlugin) Name() string

func (XxdPlugin) Run

func (XxdPlugin) Run(ctx context.Context, args []string) error

func (XxdPlugin) Usage

func (XxdPlugin) Usage() string

type YesPlugin

type YesPlugin struct{}

func (YesPlugin) Description

func (YesPlugin) Description() string

func (YesPlugin) Name

func (YesPlugin) Name() string

func (YesPlugin) Run

func (YesPlugin) Run(ctx context.Context, args []string) error

func (YesPlugin) Usage

func (YesPlugin) Usage() string

type YqPlugin

type YqPlugin struct{}

YqPlugin processes YAML (and JSON) using gojq. Input is parsed as YAML (a superset of JSON), the jq expression is applied, and results are written back as YAML by default or JSON with -j.

yq [options] <expr> [file...]
yq .name data.yaml
echo 'name: alice' | yq .name

func (YqPlugin) Description

func (YqPlugin) Description() string

func (YqPlugin) Name

func (YqPlugin) Name() string

func (YqPlugin) Run

func (YqPlugin) Run(ctx context.Context, args []string) error

func (YqPlugin) Usage

func (YqPlugin) Usage() string

type ZipPlugin

type ZipPlugin struct {
	// contains filtered or unexported fields
}

ZipPlugin creates or updates zip archives on the virtual FS.

zip archive.zip file1 file2
zip -r archive.zip dir/
zip -l archive.zip        (list, alias for unzip -l)

func Unzip

func Unzip() ZipPlugin

Unzip returns a plugin registered as "unzip".

func Zip

func Zip() ZipPlugin

Zip returns a plugin registered as "zip".

func (ZipPlugin) Description

func (z ZipPlugin) Description() string

func (ZipPlugin) Name

func (z ZipPlugin) Name() string

func (ZipPlugin) Run

func (z ZipPlugin) Run(ctx context.Context, args []string) error

func (ZipPlugin) Usage

func (ZipPlugin) Usage() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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