expansion

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package expansion applies shell-style expansion to command argument tokens: tilde expansion then pathname globbing, on unquoted tokens only.

A glob with no matches is left literal (POSIX default, no "nullglob"), so non-matching patterns reach the command unchanged. Expansion resolves globs against an injected afero.Fs, so it stays testable against an in-memory tree; it holds no knowledge of the REPL or of command semantics.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Expand

func Expand(fs afero.Fs, home Home, tokens []token.Token) []string

Expand expands a command's argument tokens into words, applying tilde then glob expansion to unquoted tokens only.

Types

type Home

type Home string

Home is the home directory used for "~" expansion. An empty value disables tilde expansion.

Jump to

Keyboard shortcuts

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