mirror of
https://github.com/martinvonz/jj.git
synced 2024-09-11 13:56:29 +03:00
I find it frustrating to wait for the typing, but I need much more time to think between commands (and users who are new to the tool surely need even more time).
27 lines
466 B
Tcl
27 lines
466 B
Tcl
set send_human {0.05 0.1 1 0.05 1}
|
|
set timeout 2
|
|
|
|
proc expect_prompt {} {
|
|
expect "$ "
|
|
}
|
|
|
|
proc run_command {cmd} {
|
|
send -h "$cmd"
|
|
send "\r"
|
|
expect -timeout 5 "$ "
|
|
}
|
|
|
|
proc quit_and_dump_asciicast_path {} {
|
|
set CTRLC \003
|
|
set CTRLD \004
|
|
set ESC \033
|
|
|
|
send $CTRLD
|
|
expect "asciinema: recording finished"
|
|
sleep 1
|
|
send $CTRLC
|
|
expect -re "asciicast saved to (.+)$ESC.*\r" {
|
|
send_user "$expect_out(1,string)\n"
|
|
}
|
|
}
|