send
Transmits input to an ITS session and returns the output it produces.
Instructions
Send input to ITS and return the output it produced.
A CR (0x0D) is appended automatically -- that is what the line editor
wants -- unless input ends with the ~- marker or raw is true. Any
literal LF/CRLF in input is normalised to CR, because a bare LF is a DDT
command (examine next location) rather than a newline.
Returns only output produced since the previous call, plus a one-word end reason: matched, quiet, timeout, more_limit or dead.
Examples: send("z") calls ITS; send("fooej") sends f-o-o ESC j CR, the
DDT altmode form usually written foo$j; send(":login rms", expect="@").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| raw | No | Send the expanded bytes verbatim: no CR appended, no newline normalisation. | |
| input | Yes | Text to send. Escapes in `input`: ~z=^Z(0x1A, calls ITS on a fresh line), ~e=ESC/altmode (DDT's $), ~c=^C, ~g=^G, ~d=rubout(0x7F), ~s=^S, ~o=^O, ~r=CR, ~n=LF (a DDT command, not a newline), ~t=tab, ~xNN=hex byte, ~~=literal tilde, trailing ~-=do not append CR. | |
| expect | No | Regex; return as soon as it matches the new output. | |
| quiet_ms | No | Return once the line has been silent this long. The timer only starts after the first byte arrives. | |
| auto_more | No | Answer '--More--' pager prompts with a space and keep collecting, up to 20 pages. | |
| timeout_ms | No | Hard cap on how long to wait. |