From 8a5e3c2f850fff353659c40df595be1cdd4b9df3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Haris=20Gu=C5=A1i=C4=87?= Date: Tue, 2 Nov 2021 17:55:07 +0100 Subject: [PATCH] Tweak delays MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Haris Gušić --- doc/demo/cheat.tut | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/doc/demo/cheat.tut b/doc/demo/cheat.tut index 496cd33..bc93410 100644 --- a/doc/demo/cheat.tut +++ b/doc/demo/cheat.tut @@ -15,10 +15,6 @@ configure() { fi } -# Set a custom prompt (optional) -# prompt() { -# } - # timeout a command but only in demo mode demo_timeout() { if mode demo; then @@ -62,7 +58,7 @@ run() { # This is where the demo/tutorial happens # Command tracker M "Read cheat sheets" e cheat tar # - unbuffer timeout 2 cheat tar + demo_timeout 2.5 cheat tar demo_clear M "Comes with many cheat sheets preinstalled" @@ -72,37 +68,37 @@ run() { demo_clear M "Search for a command" e cheat -s git # - demo_timeout 1.5 cheat -s git + demo_timeout 2 cheat -s git demo_clear M "Organize cheat sheets by tag" c cheat --tag vcs # demo_prompt - mode demo && sleep 1 + mode demo && sleep 1.5 demo_clear mkdir .cheat - generate_custom_cheatsheet > .cheat/mycommand + generate_custom_vim_cheatsheet > .cheat/custom_vim rm .lesshst M "Local cheat sheets" e tree -a # tree -a --noreport - e cheat mycommand # - cheat mycommand + e cheat custom_vim # + cheat custom_vim demo_prompt if mode demo; then sleep 1.5; fi demo_clear M "Easily edit cheat sheets" - e cheat -e mycommand # + e cheat -e custom_vim # if mode demo; then # NOTE: A bit of a hack needed to display the editor - timeout 2 tmux new-session "vim -R .cheat/mycommand" >/dev/null + timeout 2 tmux new-session "vim -R .cheat/custom_vim" >/dev/null else - cheat -e mycommand + cheat -e custom_vim fi demo_clear @@ -111,9 +107,6 @@ run() { # Demo ends here if mode demo; then c exit; fi - - # But the tutorial can continue beyond here - # TODO... } # vim: filetype=sh