From 33791d8400edba47831517cab72835d6279fa37c Mon Sep 17 00:00:00 2001 From: Mario Nebl Date: Fri, 26 Jan 2018 12:43:06 +0100 Subject: [PATCH] =?UTF-8?q?Use=20=E2=96=B6=20prompt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- screencast.sh | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/screencast.sh b/screencast.sh index 819827c..490046c 100644 --- a/screencast.sh +++ b/screencast.sh @@ -1,20 +1,31 @@ #!/bin/sh set -e -type() { - printf '\e[32m%s\e[m' "λ " - echo $1 | pv -qL $[10+(-2 + RANDOM%5)] - sleep 0.75 +PROMPT="▶ " + +enter() { + IFS='%' + type $PROMPT + type $1 + sleep 0.5 + type " " + sleep 0.25 + type "\n" eval $1 - echo "" + type "\n" + unset IFS } -type "fd" +type() { + printf '%b' $1 | pv -qL $[10+(-2 + RANDOM%5)] +} -type "fd mod" +enter "fd" -type "fd sh$" +enter "fd mod" -type "fd -H sample" +enter "fd sh" -type "fd -h" \ No newline at end of file +enter "fd -H sample" + +enter "fd -h" \ No newline at end of file