From f72e53376f0459f619ab5dc864d6c8c289bf9683 Mon Sep 17 00:00:00 2001 From: Martin von Zweigbergk Date: Fri, 22 Oct 2021 21:32:53 -0700 Subject: [PATCH] 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. --- demos/demo_git_compat.sh | 2 +- demos/demo_helpers.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/demos/demo_git_compat.sh b/demos/demo_git_compat.sh index 003404c03..6d07f30d6 100755 --- a/demos/demo_git_compat.sh +++ b/demos/demo_git_compat.sh @@ -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" diff --git a/demos/demo_helpers.sh b/demos/demo_helpers.sh index 0d83d62ec..7c6bf2a8d 100644 --- a/demos/demo_helpers.sh +++ b/demos/demo_helpers.sh @@ -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