This commit is contained in:
Raven Scott
2026-04-03 17:56:46 -04:00
parent a7e08e093c
commit ec236f9cc7
28 changed files with 1052 additions and 97 deletions
+3 -2
View File
@@ -38,7 +38,8 @@ The following are set on `ctx` before the kernel starts (unless noted as overwri
| **`requestBooterExit(code)`** | Ends the session from `/bin/exit` or equivalent |
| **`applyUnlock` / `applyRegister` / `applyLogin` / `applyLogout` / `saveVault`** | Identity and vault operations used by **`login`**, **`logout`**, **`savevault`** |
| **`shellAliases`** | Populated when the shell loads default or `~/.barerc` aliases |
| **`runBinCommand(argv)`** | Runs a command with the **same** resolution rules as the interactive shell (used by **`time`** and similar) |
| **`runBinCommand(argv)`** | Runs a command with the **same** resolution rules as the interactive shell (used by **`time`**, **`xargs`**, and similar) |
| **`registerKernelShutdownHook(fn)`** | Register an async or sync function to run when the REPL session ends, **before** initd disposers (`clearInterval`, …). See [`bare-initd.js`](../packages/bare-os-booter/lib/bare-initd.js) |
After [`createKernelReplSession`](../packages/bare-os-booter/lib/repl-session.js) returns:
@@ -55,7 +56,7 @@ When the shell runs an external command (or a pipeline stage), it may pass a **s
| Field | When |
| ----- | ---- |
| **`shellStdin`** | String body for simulated stdin (pipelines and `<` redirection) |
| **`exitCode`** | Utilities set `ctx.exitCode` for conditions (**`test`**, **`grep`**, …); the shell does not implement `&&`/`||` branching on it today |
| **`exitCode`** | Utilities set `ctx.exitCode` for conditions (**`test`**, **`grep`**, …); the shell uses it for **`&&`**, **`||`**, and **`;`** lists (see [`shell.js`](../packages/bare-os-booter/lib/shell.js)) |
Always use the `ctx` passed into **`run`**, not a global, so pipeline stdin works.