Phase 2, first part: values and value commands

- Values are Json of (text json); a record is JsonFields.
- Value commands: files, procs, open, where, select, get, sort-by,
  first, last, count, reverse, uniq, lines, from-json, to-json,
  from-csv, to-csv, each with a short name.
- Value commands next to each other run as one unit: a (std run)
  filter in a job, or in the shell when a line has no program.
- Records are shown as a table; values go to programs as lines.
- A name is a shell command, a short name, a program on PATH, then a
  long name.
- 2>&1, with >FILE 2>&1.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Linus Björnstam 2026-12-01 07:05:09 +01:00
parent 3518b7711d
commit 027acc84e6
12 changed files with 1142 additions and 37 deletions

View file

@ -22,8 +22,12 @@ non-trivial functions. No essays.
- `(bjosh shell)`: the state, variables and the job table.
- `(bjosh builtins)`: the shell commands.
- `(bjosh exec)`: lines to `(std run)` forms and jobs.
- `(bjosh values)`: values (`Json`), streams of them, text and tables.
- `(bjosh commands)`: the value commands, and their table.
- `(bjosh pipeline)`: value commands next to each other, as one unit.
- `(bjosh editor)`: when Enter runs a line, and the completer.
- Tests:
- `tests/syntax.bjo`, `tests/expand.bjo`, `tests/editor.bjo`: unit tests.
- `tests/run.bjo`: lines through `bjosh -c`, a file, and stdin.
- `tests/values.bjo`: the value commands through `bjosh -c`.
- `tests/interactive.bjo`: job control and the prompt under `script`.