piech.dev

Back to Projects github.com/Tenemo/aliases.sh

aliases.sh

Netlify Status

aliases.sh

A tiny static site that publishes my curated bash aliases and renders the real aliases.sh file with build-time syntax highlighting.

How it works

Concat examples

Quote glob patterns so your shell does not expand them before concat sees them.

# Snapshot the current directory into temp.txt
concat .

# Snapshot a specific subdirectory
concat ./src

# Exclude a generated directory anywhere in the tree
concat --exclude 'generated/'

# Exclude all snapshot files
concat --exclude '**/*.snap'

# Exclude only the root README.md
concat --exclude '/README.md'

# Pass multiple patterns after a single --exclude
concat --exclude 'generated/' '**/*.md'

# Use a bash array as the pattern list
exclude_patterns=('generated/' '**/*.md')
concat --exclude "${exclude_patterns[@]}"

# Exclude test files and coverage output together
concat . --exclude '**/*.test.ts' 'coverage/'

# Combine root-anchored, file, and directory exclusions
concat ./src --exclude 'generated/' '**/*.snap' '/README.md'

Local development

pnpm install
pnpm dev
pnpm test
pnpm bench:concat
pnpm build

Optional benchmark examples:

pnpm bench:concat
pnpm bench:concat -- --scale medium
pnpm bench:concat -- --target .

Concat benchmark

pnpm bench:concat runs the real concat function from aliases.sh. The harness launches Git Bash, sources the aliases file, runs concat ".", and measures wall-clock time around the full invocation, including snapshot generation and writing temp.txt.

By default it benchmarks against a synthetic fixture that mixes:

If you pass --target <path>, it benchmarks an existing directory instead. The benchmark restores an existing temp.txt after each run, removes generated fixtures unless told not to, and reports per-run output size, line count, included/excluded counts, output hash, plus min/median/avg/max timings.

Arguments:

On Windows, the harness needs Git Bash. Set GIT_BASH_PATH if it is installed outside the usual locations.

Notes