Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
- Paste review and `/track`: a redirect into a file is recognized wherever `>/dev/null` also appears (`echo x > ~/.zshrc 2>/dev/null` was labelled read-only), and `>|` is a redirection, not a pipe.
- `/track` and `/watch` no longer start, without asking, commands that change things through the network or another command: `env <command>`, `NAME=value` prefixes, git's `-c`/`--ext-diff`, `npm publish`/`login`/`x`, `pnpm dlx`, `ssh`, `curl -X POST`/`-d`/`-o file`, plain `wget`; options that write files (`git … --output`, `sort -o`, `jest -u`, `--fix`) are refused. Read-only probes (`ping`, `dig`, `nc -z`, a curl GET) still start at once, and `npm test 2>&1` is no longer refused as a background job ([#393](https://github.com/raiseCatError/notMyShell/issues/393)).
- `/track stop` and a closing window end every process a tracked command left in its process group, including one that ignored TERM; a tracker whose directory disappeared names it instead of reporting `spawn /bin/sh ENOENT`.
- Typing while a command runs can no longer be shown, queued or run as a command before NMSh knows whether that command reads it ([#426](https://github.com/raiseCatError/notMyShell/issues/426)). On a heavily loaded machine a reply typed right after starting a prompt-less read (`read -r reply`, `read -s`) used to be queued, and a password could be queued as a shell command or shown in the composer. Keys now wait for NMSh's check (`Checking whether … · your typing is kept` after 0.8 s). When the check cannot tell, the typing stays held and hidden — `Can't tell whether <program> is reading your typing` — until you choose: Ctrl+S sends it to the program, Tab shows it in the composer, Esc discards it. Input with echo turned off is never drawn, whatever else NMSh knows. Ctrl+C discards held typing, as a terminal flushes its input, and a command that ends while typing was held for its check never runs it (a note says so). Type-ahead on an idle machine is unchanged.

## [0.20.0] - 2026-10-18

Expand Down
22 changes: 18 additions & 4 deletions docs/design/input-awareness.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,24 @@ Probes back off (every 10 s after a minute of quiet), and the first look comes 1
typed in that time would be routed on no evidence. So the frontend holds the keys that decide where typing goes, the
first key of a draft and an Enter that would queue, and asks the session to look now (`input-look`, answered by
`input-looked` after any `input-state` the look produced). Keys typed right after Enter wait for the shell's exec first.
The hold ends when the look is done, when evidence arrives, or after 800 ms, and the keys are then routed on what is
known, in the order typed. A program that took the terminal meanwhile (Fish's reader) gets them as raw keys. Ctrl+C is
never held, and typing right after Ctrl+C or Ctrl+Z stays type-ahead for the prompt. Both ends negotiate the feature;
an older service is never asked and behaves as before.
The hold ends when the look answers or evidence arrives. Until then nothing typed is drawn, sent or queued: the keys
may be a hidden reply, and an Enter may answer the command or queue the next one (#426). The look says what it saw:
`hidden` (echo off for line input), `visible` (the terminal echoes), `unknown` (no sample said how it echoes: a probe
failed or timed out), `idle` (nothing runs) or `unavailable` (no way to look on this platform). `visible` routes the
keys as before (a terminal would show them too); `hidden` comes with a hidden request, so they go straight to the
program. Echo off with line input is a hidden request whatever else is known (confirmed when the group is idle,
likely when it computes or the kernel says it is blocked elsewhere), so NMSh never draws what the terminal would not
echo. An `unknown` answer gets one more look; if that is blind too, or no answer comes within 5 s, the keys stay held
and hidden: the activity rows say `Can't tell whether <program> is reading your typing` and Ctrl+S sends it to the
program, Tab shows it in the composer (for review; a final Enter is not replayed), Esc discards it. Later evidence
decides it the same way. A look still running after 800 ms says `Checking whether … · your typing is kept`.

A command that ends while its typing was held past 800 ms never runs it: NMSh never learned whether it was a reply
(a timed `read -s` that gave up), so it is discarded with a note. A quick end (type-ahead after a short command) runs
it as before. Ctrl+C discards held typing, as a terminal flushes its input queue on an interrupt, and is itself
never held. A program that took the terminal meanwhile (Fish's reader) gets the keys as raw keys. An older service
does not say what its look saw; its answers are routed as before. Typing right after Ctrl+C or Ctrl+Z stays
type-ahead for the prompt. Both ends negotiate the feature; an older service is never asked and behaves as before.

When an answer goes to the program (a key in key mode, Enter otherwise), the frontend counts the question as answered
until the session reports again, so the next command typed at speed is routed on fresh evidence.
Expand Down
Loading
Loading