1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-11 15:14:16 +03:00
wezterm/wt-replay
2019-03-22 20:41:50 -07:00

24 lines
423 B
Bash
Executable File

#!/bin/bash
# Replays a recorded session
TRANSCRIPT="$1"
if test -z "$TRANSCRIPT" -o ! -f "$TRANSCRIPT" ; then
echo "usage: wt-replay TRANSCRIPT.tgz"
exit 1
fi
WHERE=`mktemp -d`
tar xzf "$TRANSCRIPT" -C $WHERE
echo "--- Starting replay ---"
case $OSTYPE in
darwin*)
script -p $WHERE/*.typescript
;;
linux*)
scriptreplay $WHERE/*.timing $WHERE/*.typescript
;;
esac
echo "--- replay complete ---"