forked from mirrors/jj
demos: set title when creating recording
According to asciinema.org, it should be possible to change the title after uploading, but I couldn't figure out how to do that. Let's set it when creating the recording. That also means it's one less step to perform when re-running scripts.
This commit is contained in:
parent
2dd0bf7b12
commit
f72e53376f
2 changed files with 4 additions and 3 deletions
|
@ -5,7 +5,7 @@ parse_args "$@"
|
|||
|
||||
new_tmp_dir
|
||||
|
||||
run_demo '
|
||||
run_demo 'Clone a Git repo' '
|
||||
run_command "# Clone a Git repo:"
|
||||
run_command "jj git clone https://github.com/octocat/Hello-World"
|
||||
run_command "cd Hello-World"
|
||||
|
|
|
@ -44,9 +44,10 @@ new_tmp_dir() {
|
|||
}
|
||||
|
||||
run_demo() {
|
||||
local expect_script="$1"
|
||||
local title="$1"
|
||||
local expect_script="$2"
|
||||
expect_script=$(printf "source $BASE_DIR/demo_helpers.tcl
|
||||
spawn asciinema rec -c \"PS1='$ ' bash --norc\"
|
||||
spawn asciinema rec -c \"PS1='$ ' bash --norc\" --title \"$title\"
|
||||
expect_prompt
|
||||
%s
|
||||
quit_and_dump_asciicast_path
|
||||
|
|
Loading…
Reference in a new issue