1
1
mirror of https://github.com/wez/wezterm.git synced 2024-12-22 21:01:36 +03:00

Add some helper scripts for diagnostic purposes

The idea is that these will help folks convey the nature of problems
that they might hit in the future.
This commit is contained in:
Wez Furlong 2018-02-25 08:01:32 -08:00
parent 981d939298
commit de8c2f17d8
2 changed files with 25 additions and 0 deletions

9
wt-record Executable file
View File

@ -0,0 +1,9 @@
#!/bin/sh
# 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
echo "Transcript recorded in $NOW.tgz"

16
wt-replay Executable file
View File

@ -0,0 +1,16 @@
#!/bin/sh
# 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 ---"
scriptreplay $WHERE/*.timing $WHERE/*.typescript
echo "--- replay complete ---"