fd/screencast.sh

34 lines
369 B
Bash
Raw Normal View History

2018-01-20 20:47:29 +01:00
#!/bin/sh
set -e
2018-01-26 12:43:06 +01:00
PROMPT="▶ "
enter() {
IFS='%'
type $PROMPT
type $1
sleep 0.5
2018-01-26 12:50:49 +01:00
printf '%b' " ⏎\n"
sleep 0.1
2018-01-20 20:47:29 +01:00
eval $1
2018-01-26 12:43:06 +01:00
type "\n"
unset IFS
}
type() {
printf '%b' $1 | pv -qL $[10+(-2 + RANDOM%5)]
2018-01-20 20:47:29 +01:00
}
2018-01-26 12:43:06 +01:00
enter "fd"
2018-01-20 20:47:29 +01:00
2018-01-26 12:50:49 +01:00
enter "fd -e md"
enter "fd -e md --exec wc -l"
2018-01-26 12:43:06 +01:00
enter "fd mod"
2018-01-20 20:47:29 +01:00
2018-01-26 12:43:06 +01:00
enter "fd sh"
2018-01-20 20:47:29 +01:00
2018-01-26 12:43:06 +01:00
enter "fd -H sample"
2018-01-20 20:47:29 +01:00
2018-01-26 12:43:06 +01:00
enter "fd -h"