diff options
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 21 | ||||
| -rw-r--r-- | docs/tags.md | 6 |
2 files changed, 26 insertions, 1 deletions
@@ -253,6 +253,27 @@ same tree without leaving the process. command that says so and ends `exit 127`. `echo Tty > pane/<n>/ctl` makes an interactive terminal in that pane's directory. +A terminal can be bound as a language's REPL: `Repl python` in its tag or +on its `ctl` (the language names are the syntax table's; `Repl -` unbinds, +`Repl` bare says the binding, `Repl python` again changes nothing). Its tag +shows its id, `python-a`, `python-b` for the next, a freed letter reused. +Then an exec made by a gesture on the body of a file in that language -- a +middle click, the execute key, on a selection or a single word, even `make` +in a comment -- or on the REPL's own body is typed into the REPL instead of +run: bracketed paste when its program asked for it (DECSET 2004), else line +by line, where a blank line inside a Python block ends the block (said +once), then Enter. The message row says `→ python-a` in the tag's name tint +and the log `send <from> <to> <id>`. With several REPLs bound for the +language the pane asks which, on its notice band, one key answering and Esc +sending nowhere; nothing is remembered. A command pane whose command is done +is no REPL any more. Still commands, whatever is bound: a word in a tag (so +the tag is how to run `make` from that file), `Exec <text>` run by name +(typed, a 2-1 chord onto `Exec`, a `ctl` line) and a command word @`cmd` in +the text, looked at or clicked (`# @`pytest -x`` in a script). A 9P `exec` +is no gesture and is never sent: a script writes to the REPL pane's +`pty/data`. The REPL gets the text wherever it is -- at a `pdb` or `input()` +prompt too. Bindings are not dumped, so a Restore leaves none. + The root's pair clicks at the active pane and `/pane/<n>/look` and `/pane/<n>/exec` at that pane. Blank lines are skipped, and every other line is checked before any of them runs, so a control character fails the whole diff --git a/docs/tags.md b/docs/tags.md index f1d7794d..f1e4a420 100644 --- a/docs/tags.md +++ b/docs/tags.md @@ -11,7 +11,11 @@ with the tag's name colour: `Tty+arg` is one word a tag can hold for `Tty arg`, so clicking it opens another terminal on that shell, as `Tty fish` would. Only a builtin that declares `plus_arg` reads a `+` so; `Tty` is the one, since other arguments (a dump's name) may contain `+`. A command pane's tag reads `<dir> (<line>) running` or `exit N` -and offers `Kill`. +and offers `Kill`. `Repl python` in a terminal's tag binds it as Python's +REPL, its id, `python-a`, beside the Tty word: a middle click or the execute +key on a `.py` body then types the text into it rather than running it, and +several bound ask which. The tag's own words, `Exec <text>` by name and a +command word @`cmd` still run as commands (docs/fs.md). Pane and column command text leave a small gap after their aligned drag grips. GUI pane mode symbols are centered by their visible ink; changing the font or its size refreshes the cached measurements. |
