Wait for prompt
On VT (SSH) hosts: wait until the host has finished writing and the cursor sits after a prompt such as $, # or >, e.g. after a command.
Command in the Terminal emulator toolkit · id ooa.terminal/wait_for_prompt · 5 inputs, 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Session | String | No | terminal | Session name. |
| Prompt | String | No | [$#>%]\s*$ | Regular expression the text before the cursor must end with; a shell prompt ($, #, >, %) when empty. |
| Timeout (seconds) | Number | No | 30 | Maximum wait. |
| Quiet (milliseconds) | Number | No | 300 | The screen must stay unchanged this long, so a prompt-like character in the middle of output does not count. |
| Fail on timeout | Boolean | No | true | Stop with an error on timeout; when off, found is false instead. |
Outputs
| Output | Type | What it is |
|---|---|---|
| found | Boolean | True when the prompt appeared in time (false only when fail_on_timeout is off). |
| prompt_line | String | The line with the prompt, as shown. |