No description
Find a file
Merith-TK 13f268fb86 # shell: extract configuration to own package
## What changed

- Created `config/config.go` with `Config` and `ShellConfig` structs, plus `Load()` and `Defaults()` helpers.
- `Load()` uses `core/config.InitTemplate` for 3-layer loading (compiled defaults → `/etc/residual/shell.toml` → `~/.config/residual/shell.toml`) and writes a commented template on first run.
- Updated `cmd/res-sh/main.go` to import `git.merith.xyz/residual/shell/config` instead of `core/config`.

## Files touched

- `config/config.go` — new
- `cmd/res-sh/main.go` — import swap; `git.merith.xyz/residual/core/config` → `git.merith.xyz/residual/shell/config`

## Why

Shell history/prompt settings are specific to `res-sh` and do not belong in the shared `core` library. `core/config` retains only the generic loader and path helpers.
2026-05-03 13:26:57 -07:00
cmd/res-sh # shell: extract configuration to own package 2026-05-03 13:26:57 -07:00
config # shell: extract configuration to own package 2026-05-03 13:26:57 -07:00
remnant init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
builtin.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
exec.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
expand.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
go.mod init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
go.sum init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
parse.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
README docs: add README 2026-04-15 20:50:37 -07:00
redirect.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00
shell.go init: residual/shell — shell engine + remnant + res-sh binary 2026-04-15 19:12:12 -07:00

residual/shell
==============

shell engine and interactive shell for residual.

packages:
  shell/      minimal shell engine — tokenize, parse, execute pipelines,
              builtins (cd, exit, pwd, export, echo). no interactivity.
              used as embedded fallback in res-console.
  remnant/    wraps shell with history, aliases, tab completion, styled prompt.
              the "just enough to be a shell" layer.

binary:
  res-sh      full-featured interactive shell. wraps remnant.

build:
  go build ./cmd/res-sh

module:   git.merith.xyz/residual/shell
requires: git.merith.xyz/residual/core