mirror of
https://github.com/wez/wezterm.git
synced 2024-12-22 04:41:34 +03:00
update record/play scripts for macos
This commit is contained in:
parent
6cbb3ba432
commit
27c4de367e
16
wt-record
16
wt-record
@ -1,9 +1,19 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Runs wezterm using `script` to record a session with timing information
|
||||
|
||||
NOW=`date -u +%Y%m%d%H%M%S`
|
||||
echo $NOW
|
||||
|
||||
./target/release/wezterm -- script -t$NOW.timing $NOW.typescript
|
||||
tar -cz --remove-files -f $NOW.tgz $NOW.timing $NOW.typescript
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
./target/release/wezterm start -- script -r $NOW.typescript
|
||||
tar -cz -f $NOW.tgz $NOW.typescript
|
||||
;;
|
||||
|
||||
linux*)
|
||||
./target/release/wezterm start -- script -t$NOW.timing $NOW.typescript
|
||||
tar -cz --remove-files -f $NOW.tgz $NOW.timing $NOW.typescript
|
||||
;;
|
||||
esac
|
||||
|
||||
echo "Transcript recorded in $NOW.tgz"
|
||||
|
11
wt-replay
11
wt-replay
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# Replays a recorded session
|
||||
TRANSCRIPT="$1"
|
||||
|
||||
@ -11,6 +11,13 @@ WHERE=`mktemp -d`
|
||||
tar xzf "$TRANSCRIPT" -C $WHERE
|
||||
|
||||
echo "--- Starting replay ---"
|
||||
scriptreplay $WHERE/*.timing $WHERE/*.typescript
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
script -p $WHERE/*.typescript
|
||||
;;
|
||||
linux*)
|
||||
scriptreplay $WHERE/*.timing $WHERE/*.typescript
|
||||
;;
|
||||
esac
|
||||
echo "--- replay complete ---"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user