diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-03 15:45:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-09-03 15:45:52 -0300 |
| commit | e7cc89761e693833fe3fcabf022408741cf87709 (patch) | |
| tree | 33385b2c96e21e3ef1293d5be9a0a6c4e2e272fb /src/normal_input.zig | |
| parent | d89c0b532df23ed5b48495f83725893d5d82042b (diff) | |
| download | pardes-e7cc89761e693833fe3fcabf022408741cf87709.tar.gz pardes-e7cc89761e693833fe3fcabf022408741cf87709.zip | |
errors: a mistyped flag is a sentence, and a pipe is not a document
Every argv refusal in main.zig was `return error.BadArgs` out of `main`, which
std prints as `error: BadArgs` with a return trace under it — the same shape a
real crash has, for the most ordinary thing a person can do. It also said
`BadArgs` and nothing about which argument, at sites that knew exactly:
pardes: no such option: --hepl
pardes: -n takes 1 or 3, not 'abc'
pardes: one file or directory at a time, and 'b' is the second
pardes: --detach and --attach are opposites: one runs the session, the
other joins one
Try 'pardes --help'.
stderr rather than the `+Errors` pane one function down, because argv is read
before a core exists and the person who mistyped a flag is looking at the
prompt they typed it into. `--attach`'s refusal already answered this way; now
all eleven do. `getcwd` failing is no longer reported as an argument problem,
and a `.url` or `@pN` positional says why a LAUNCH cannot act on it rather
than being swept into the same word as a typo.
AND `Look` ON A FIFO NO LONGER FREEZES THE EDITOR. `readFile` opened with a
plain blocking `open`, so a named pipe with no writer waited forever — inside
the keystroke that asked, with no frame, no message row and, in the tty shell,
no Ctrl-C either, because the terminal is in raw mode. It is `O_NONBLOCK` now,
the read loops answer `EAGAIN` rather than waiting, and `lseek` answering
ESPIPE — a pipe, a socket, a terminal — is refused as `NotAFile`, which the
boot pane spells "that is a pipe or a device, not a document". Without that
last part an unwritten FIFO read as EOF and opened a silent empty pane, which
says less than the hang did. The zero-size files worth streaming (procfs and
its kin) seek fine and are untouched.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016Q4RATpafkwahrovHQLKRf
Diffstat (limited to 'src/normal_input.zig')
0 files changed, 0 insertions, 0 deletions
