diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 14:20:56 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | e7c181d6238dae4b08a02c1a9828917c2497f89d (patch) | |
| tree | 299d4146c53ca5f882ba37cceb67a37302be2437 /docs/open-questions.md | |
| parent | eb2428115588004a8bc04a09d45fb1104f727882 (diff) | |
| download | pardes-e7c181d6238dae4b08a02c1a9828917c2497f89d.tar.gz pardes-e7c181d6238dae4b08a02c1a9828917c2497f89d.zip | |
A command line runs as its own command pane unless it is clicked at a shell's prompt
A middle click, an exec write or a tag word that no builtin knows was typed
into some terminal for the pane's directory, sharing whatever state that
shell was in and answering nothing, so a misspelling vanished into a shell.
Now only a line clicked at an interactive terminal's prompt is typed there.
From anywhere else it runs as a command pane: a terminal whose child is
$SHELL -c the line in the pane's directory, full emulation, which shows its
output and then exit N from the host's reaping of the child, and stays. A
finished command pane is the next command's for its directory, which runs
below what it showed after a '% line' line (acme appends to +Errors and never
clears it, util.c:213); a running one gets a second pane. Kill ends a command
pane's whole process group, the log records run and exit, exec reads back the
command pane's serial, and a line is at most 1 KB, read off the pane as the
host forks rather than carried in every spawn effect. ttyForDir's search for
a free shell is gone. The goldens of chordcut, cmdword and layout-open change
where a file's exec now opens a command pane, and ttytaken is rewritten to
exec from the terminal itself; docs/open-questions.md records the decision.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/open-questions.md')
| -rw-r--r-- | docs/open-questions.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/open-questions.md b/docs/open-questions.md index db491213..a2ce2086 100644 --- a/docs/open-questions.md +++ b/docs/open-questions.md @@ -6,7 +6,22 @@ picked up without redoing the research. ## Where does an unknown command word run? Raised 2026-09-27 in the review of pardes against acme (Plan 9 source at -`~/05-genizah/principia-softwarica`). Undecided. +`~/05-genizah/principia-softwarica`). + +**Decided 2026-09-28: a command pane.** Clicked or written at an interactive +terminal at its prompt, the line is typed into that shell, whose state the +clicker can see. From anywhere else it runs as its own terminal pane whose +child is `$SHELL -c` the line in the pane's directory: full emulation +(colours, `less`, `vim`, `sudo`'s prompt work), the exit status from waiting +on the child (`exit N`, `exit 127` for a misspelling, no prompt marks +needed), Kill signalling its process group, `run`/`exit` records in the log, +and `exec` answering its serial. One command pane per directory is reused +once done, and keeps what it showed, as acme appends to `+Errors` and never +clears it (util.c:213-221). Chosen over acme's process-into-`+Errors` because +it keeps interactive programs working without a streaming runner, and over +a PATH check before typing into a shell, which misjudges builtins, aliases +and functions and leaves the shell's state in the way. The analysis below is +what it was decided from. **Today.** A middle-click, an `exec` write or a tag word that is not a builtin is typed into a terminal pane: the pane itself when it takes a command line, |
