vcr
will create a tape for vhs,
based on a regular shell script, allowing creation of a demo without manual
intervention with the vhs
shell, and ensuring that the commands are correct.
Some vhs
behavior can be controlled in a command-by-command basis using
comments in the script with the tag vcr:
(as in # vcr:
).
The available commands are:
clear[=<time>]
: Clear the screen before the next command, after the specified amount of time. Default time is 3s.hide
: Hide commandsshow
: Show commands (afterhide
)wait="[+context] <regex>"
: Wait context and regex. By defaultvcr
waits for a prompt ending with with[$#] *
.prompt=/<regex>/
: Set the prompt to wait before executing the next commandtimeout=<time>
: Modify the default timeout to wait for a command. Default is 10s.sleep=<time>
: Wait some specific amount of time. Uses
for seconds,ms
for miliseconds, andm
for minutes. Note: Usingsleep
will overridewait
.
Multiple commands can be used an one, as in # vcr: show clear wait="+OK"
In a vcr
comment, anything after --
is ignored.
Comments on the original script are "typed" in the final demo, so there's a way to give instructions to the audience.