@@ -31,6 +31,7 @@ asciicast v3 file looks like this:
31
31
# terminal window resized to 90 cols and 30 rows
32
32
[2.050000 , " r" , " 90x30" ]
33
33
[1.541828 , " o" , " Bye!" ]
34
+ [0.8870 , " x" , " 0" ]
34
35
```
35
36
36
37
## Header
@@ -204,8 +205,8 @@ Each element of the event stream is a 3-tuple encoded as JSON array:
204
205
Where:
205
206
206
207
* ` interval ` (float) - time interval from the previous event (in seconds),
207
- * ` code ` (string) - event type code, one of: ` "o" ` , ` "i" ` , ` "m" ` , ` "r" `
208
- * ` data ` (any ) - event specific data, described separately for each event
208
+ * ` code ` (string) - event type code, one of: ` "o" ` , ` "i" ` , ` "m" ` , ` "r" ` , ` "x" `
209
+ * ` data ` (string ) - event specific data, described separately for each event
209
210
code.
210
211
211
212
For example, let's look at the following line:
@@ -227,7 +228,7 @@ current and future versions of the format. For example, we may add new event
227
228
code for text overlay (subtitles display).
228
229
229
230
A tool which interprets the event stream (a player or a post-processor) should
230
- ignore (or pass through) event codes it doesn't understand or doesn't care
231
+ ignore (or pass through) event with codes it doesn't understand or doesn't care
231
232
about.
232
233
233
234
#### o - output, data written to a terminal
@@ -294,10 +295,28 @@ Those are captured in response to `SIGWINCH` signal.
294
295
` data ` contains new terminal size (columns + rows) formatted as
295
296
` "{COLS}x{ROWS}" ` .
296
297
298
+ Example:
299
+
297
300
``` json
298
301
[5.0 , " r" , " 100x50" ]
299
302
```
300
303
304
+ ### x - exit
305
+
306
+ Event with code ` "x" ` represents session exit status.
307
+
308
+ ` data ` is a numerical exit status of session's main child process (e.g. a
309
+ shell).
310
+
311
+ This event is typically included only once, as the very last event of the
312
+ recording.
313
+
314
+ Example:
315
+
316
+ ``` json
317
+ [5.0 , " x" , " 0" ]
318
+ ```
319
+
301
320
## File extension
302
321
303
322
Suggested file extension is ` .cast ` .
0 commit comments