-
Notifications
You must be signed in to change notification settings - Fork 359
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It would be nice if the playback of a .tape file could be aborted if the shell exits, e.g. due to set -e and a command failing, or even due to an explicit exit.
At the moment, the shell dies in that situation, but the TTY emulator keeps running, so you get a blinking cursor just sitting there until the tape is completed.
The only workaround I could come up with is a check like this after "critical" commands (the name is just to ensure a slightly nicer error message on failure):
Wait@1s /(?<CheckIfShellExited>.)/
But this has to be repeated in any location where a command might fail, and if that command takes a while, then the exact lengths of timeouts become problematic.
Is there a way to detect that the shell has exited, and abort the recording with an error?
Example:
Type "set -e" Enter
Sleep 1000 ms
Type "echo hi" Enter
Sleep 1000 ms
Type "false" Enter
Sleep 1000 ms
Type "Hello?" Enter
Sleep 5000 ms
Type "Anybody home?" Enter
Sleep 5000 ms
Type ":("
Sleep 2000 ms
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
